@@ -11,6 +11,7 @@ import {
1111import { Focusable } from '../core/a11y/focus-key-manager' ;
1212import { coerceBooleanProperty } from '../core/coercion/boolean-property' ;
1313import { CanColor , mixinColor } from '../core/common-behaviors/color' ;
14+ import { CanDisable , mixinDisabled } from '../core/common-behaviors/disabled' ;
1415
1516export interface MdChipEvent {
1617 chip : MdChip ;
@@ -20,7 +21,7 @@ export interface MdChipEvent {
2021export class MdChipBase {
2122 constructor ( public _renderer : Renderer2 , public _elementRef : ElementRef ) { }
2223}
23- export const _MdChipMixinBase = mixinColor ( MdChipBase , 'primary' ) ;
24+ export const _MdChipMixinBase = mixinColor ( mixinDisabled ( MdChipBase ) , 'primary' ) ;
2425
2526
2627/**
@@ -39,7 +40,7 @@ export class MdBasicChip { }
3940@Directive ( {
4041 selector : `md-basic-chip, [md-basic-chip], md-chip, [md-chip],
4142 mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]` ,
42- inputs : [ 'color' ] ,
43+ inputs : [ 'color' , 'disabled' ] ,
4344 host : {
4445 'class' : 'mat-chip' ,
4546 'tabindex' : '-1' ,
@@ -52,11 +53,7 @@ export class MdBasicChip { }
5253 '(blur)' : '_hasFocus = false' ,
5354 }
5455} )
55- export class MdChip extends _MdChipMixinBase implements Focusable , OnDestroy , CanColor {
56- /** Whether or not the chip is disabled. */
57- @Input ( ) get disabled ( ) : boolean { return this . _disabled ; }
58- set disabled ( value : boolean ) { this . _disabled = coerceBooleanProperty ( value ) ; }
59- protected _disabled : boolean = null ;
56+ export class MdChip extends _MdChipMixinBase implements Focusable , OnDestroy , CanColor , CanDisable {
6057
6158 /** Whether the chip is selected. */
6259 @Input ( ) get selected ( ) : boolean { return this . _selected ; }
0 commit comments