File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ import {
2323 <button
2424 class="bx--overflow-menu-options__btn"
2525 role="menuitem"
26- [ngClass]="{
27- 'bx--overflow-menu-options__option--danger': type === 'danger',
28- 'bx--overflow-menu-options__option--disabled': disabled
29- }"
26+ [disabled]="disabled"
3027 [tabindex]="(disabled ? -1 : null)"
3128 [title]="(titleEnabled ? content : '')">
3229 <ng-content></ng-content>
@@ -37,6 +34,15 @@ export class OverflowMenuOption {
3734 @HostBinding ( "class" ) optionClass = "bx--overflow-menu-options__option" ;
3835 @HostBinding ( "attr.role" ) role = "presentation" ;
3936
37+ @HostBinding ( "class.bx--overflow-menu-options__option--danger" )
38+ public get isDanger ( ) : Boolean {
39+ return this . type === "danger" ;
40+ }
41+
42+ @HostBinding ( "class.bx--overflow-menu-options__option--disabled" )
43+ public get isDisabled ( ) : Boolean {
44+ return this . disabled ;
45+ }
4046 /**
4147 * toggles between `normal` and `danger` states
4248 */
Original file line number Diff line number Diff line change @@ -81,8 +81,6 @@ export class OverflowMenuPane extends Dialog {
8181 }
8282
8383 private listItems ( ) {
84- const buttonClass = ".bx--overflow-menu-options__btn" ;
85- const disabledClass = ".bx--overflow-menu-options__option--disabled" ;
86- return Array . from < any > ( this . dialog . nativeElement . querySelectorAll ( `${ buttonClass } :not(${ disabledClass } )` ) ) ;
84+ return Array . from < any > ( this . dialog . nativeElement . querySelectorAll ( ".bx--overflow-menu-options__btn:not([disabled])" ) ) ;
8785 }
8886}
Original file line number Diff line number Diff line change 6868 "MODAL" : {
6969 "CLOSE" : " Close modal"
7070 },
71+ "OVERFLOW_MENU" : {
72+ "OVERFLOW" : " Overflow"
73+ },
7174 "SIDENAV" : {
7275 "NAV_LABEL" : " Side navigation"
7376 },
You can’t perform that action at this time.
0 commit comments