Infers the button's appearance from its static attributes.
(button: HTMLElement)
| 90 | |
| 91 | /** Infers the button's appearance from its static attributes. */ |
| 92 | function _inferAppearance(button: HTMLElement): MatButtonAppearance | null { |
| 93 | if (button.hasAttribute('mat-raised-button')) { |
| 94 | return 'elevated'; |
| 95 | } |
| 96 | |
| 97 | if (button.hasAttribute('mat-stroked-button')) { |
| 98 | return 'outlined'; |
| 99 | } |
| 100 | |
| 101 | if (button.hasAttribute('mat-flat-button')) { |
| 102 | return 'filled'; |
| 103 | } |
| 104 | |
| 105 | if (button.hasAttribute('mat-button')) { |
| 106 | return 'text'; |
| 107 | } |
| 108 | |
| 109 | return null; |
| 110 | } |
| 111 | |
| 112 | // tslint:disable:variable-name |
| 113 | /** |