diff --git a/core/src/components/item-option/item-option.scss b/core/src/components/item-option/item-option.scss index 30ba65d8d42..b01024e6ece 100644 --- a/core/src/components/item-option/item-option.scss +++ b/core/src/components/item-option/item-option.scss @@ -112,3 +112,17 @@ transition-property: none; transition-timing-function: cubic-bezier(.65, .05, .36, 1); } + + +// Item Disabled Styling +// -------------------------------------------------- + +:host(.item-option-disabled) { + pointer-events: none; +} + +:host(.item-option-disabled) .button-native { + cursor: default; + opacity: .5; + pointer-events: none; +} diff --git a/core/src/components/item-option/item-option.tsx b/core/src/components/item-option/item-option.tsx index 1a231a11088..360aeb40f74 100644 --- a/core/src/components/item-option/item-option.tsx +++ b/core/src/components/item-option/item-option.tsx @@ -60,10 +60,12 @@ export class ItemOption implements ComponentInterface { } hostData() { + const { disabled, expandable } = this; return { class: { ...createColorClasses(this.color), - 'item-option-expandable': this.expandable, + 'item-option-disabled': disabled, + 'item-option-expandable': expandable, 'ion-activatable': true, } }; diff --git a/core/src/components/item-sliding/test/basic/index.html b/core/src/components/item-sliding/test/basic/index.html index 2ced8cc67ae..3502bc67362 100644 --- a/core/src/components/item-sliding/test/basic/index.html +++ b/core/src/components/item-sliding/test/basic/index.html @@ -120,6 +120,30 @@
Buttons should not be clickable
+