Skip to content

Commit e7d9a14

Browse files
committed
Fix danger and disabled styling
1 parent 2df1c0a commit e7d9a14

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/dialog/overflow-menu/overflow-menu-option.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
class="bx--overflow-menu-options__btn"
2525
role="menuitem"
2626
[ngClass]="{
27-
'bx--overflow-menu-options__option--danger': type === 'danger',
2827
'bx--overflow-menu-options__option--disabled': disabled
2928
}"
3029
[tabindex]="(disabled ? -1 : null)"
@@ -37,6 +36,15 @@ export class OverflowMenuOption {
3736
@HostBinding("class") optionClass = "bx--overflow-menu-options__option";
3837
@HostBinding("attr.role") role = "presentation";
3938

39+
@HostBinding("class.bx--overflow-menu-options__option--danger")
40+
public get isDanger(): Boolean {
41+
return this.type === "danger";
42+
}
43+
44+
@HostBinding("class.bx--overflow-menu-options__option--disabled")
45+
public get isDisabled(): Boolean {
46+
return this.disabled;
47+
}
4048
/**
4149
* toggles between `normal` and `danger` states
4250
*/

0 commit comments

Comments
 (0)