|
1 | 1 | <div class="demo-button">
|
| 2 | + <h4 class="section-header">Buttons</h4> |
2 | 3 | <section>
|
3 | 4 | <button mat-button>flat</button>
|
4 | 5 | <button mat-raised-button>raised</button>
|
5 |
| - |
| 6 | + <button mat-stroked-button>stroked</button> |
| 7 | + <button mat-flat-button>flat</button> |
6 | 8 | <button mat-fab><mat-icon>check</mat-icon></button>
|
7 |
| - <button mat-fab color="primary">Btn</button> |
8 |
| - <a mat-fab color="warn" routerLink=".">Link</a> |
9 |
| - <a mat-fab routerLink="."><mat-icon>check</mat-icon></a> |
10 |
| - |
11 | 9 | <button mat-mini-fab><mat-icon>check</mat-icon></button>
|
12 |
| - <button mat-mini-fab color="primary">Btn</button> |
13 |
| - <a mat-mini-fab color="warn" routerLink=".">Link</a> |
14 |
| - <a mat-mini-fab routerLink="."><mat-icon>check</mat-icon></a> |
15 | 10 | </section>
|
16 | 11 |
|
| 12 | + <h4 class="section-header">Anchors</h4> |
17 | 13 | <section>
|
18 |
| - <a href="http://www.google.com" mat-button color="primary">SEARCH</a> |
19 |
| - <a href="http://www.google.com" mat-raised-button>SEARCH</a> |
20 |
| - <a href="http://www.google.com" mat-fab> |
21 |
| - <mat-icon>check</mat-icon> |
22 |
| - </a> |
23 |
| - <a href="http://www.google.com" mat-mini-fab> |
24 |
| - <mat-icon>check</mat-icon> |
25 |
| - </a> |
| 14 | + <a href="//www.google.com" mat-button color="primary">SEARCH</a> |
| 15 | + <a href="//www.google.com" mat-raised-button>SEARCH</a> |
| 16 | + <a href="//www.google.com" mat-stroked-button color="primary">SEARCH</a> |
| 17 | + <a href="//www.google.com" mat-flat-button>SEARCH</a> |
| 18 | + <a href="//www.google.com" mat-fab><mat-icon>check</mat-icon></a> |
| 19 | + <a href="//www.google.com" mat-mini-fab><mat-icon>check</mat-icon></a> |
26 | 20 | </section>
|
27 | 21 |
|
| 22 | + <h4 class="section-header">Text Buttons [mat-button]</h4> |
28 | 23 | <section>
|
29 | 24 | <button mat-button color="primary">primary</button>
|
30 | 25 | <button mat-button color="accent">accent</button>
|
31 | 26 | <button mat-button color="warn">warn</button>
|
| 27 | + <button mat-button disabled>disabled</button> |
32 | 28 | </section>
|
33 | 29 |
|
| 30 | + <h4 class="section-header">Raised Buttons [mat-raised-button]</h4> |
34 | 31 | <section>
|
35 | 32 | <button mat-raised-button color="primary">primary</button>
|
36 | 33 | <button mat-raised-button color="accent">accent</button>
|
37 | 34 | <button mat-raised-button color="warn">warn</button>
|
| 35 | + <button mat-raised-button disabled>disabled</button> |
38 | 36 | </section>
|
39 | 37 |
|
| 38 | + <h4 class="section-header">Stroked Buttons [mat-stroked-button]</h4> |
40 | 39 | <section>
|
41 |
| - <button mat-fab color="primary"> |
42 |
| - <mat-icon>home</mat-icon> |
43 |
| - </button> |
44 |
| - <button mat-fab color="accent"> |
45 |
| - <mat-icon>favorite</mat-icon> |
46 |
| - </button> |
47 |
| - <button mat-fab color="warn"> |
48 |
| - <mat-icon>feedback</mat-icon> |
49 |
| - </button> |
| 40 | + <button mat-stroked-button color="primary">primary</button> |
| 41 | + <button mat-stroked-button color="accent">accent</button> |
| 42 | + <button mat-stroked-button color="warn">warn</button> |
| 43 | + <button mat-stroked-button disabled>disabled</button> |
50 | 44 | </section>
|
51 | 45 |
|
| 46 | + <h4 class="section-header">Flat Buttons [mat-flat-button]</h4> |
52 | 47 | <section>
|
53 |
| - <button mat-icon-button color="primary"> |
54 |
| - <mat-icon>menu</mat-icon> |
55 |
| - </button> |
56 |
| - |
57 |
| - <button mat-icon-button color="accent"> |
58 |
| - <mat-icon>favorite</mat-icon> |
59 |
| - </button> |
60 |
| - |
61 |
| - <button mat-icon-button> |
62 |
| - <mat-icon>more_vert</mat-icon> |
63 |
| - </button> |
| 48 | + <button mat-flat-button color="primary">primary</button> |
| 49 | + <button mat-flat-button color="accent">accent</button> |
| 50 | + <button mat-flat-button color="warn">warn</button> |
| 51 | + <button mat-flat-button disabled>disabled</button> |
64 | 52 | </section>
|
65 | 53 |
|
| 54 | + <h4 class="section-header"> Icon Buttons [mat-icon-button]</h4> |
66 | 55 | <section>
|
67 |
| - <div> |
68 |
| - <p>isDisabled: {{isDisabled}}, clickCounter: <span>{{clickCounter}}</span></p> |
69 |
| - <button mat-raised-button (click)="isDisabled=!isDisabled"> |
70 |
| - Disable buttons |
71 |
| - </button> |
72 |
| - <button mat-raised-button (click)="button1.focus()">Focus 1</button> |
73 |
| - <button mat-raised-button (click)="button2.focus()">Focus 2</button> |
74 |
| - <button mat-raised-button (click)="button3.focus()">Focus 3</button> |
75 |
| - <button mat-raised-button (click)="button4.focus()">Focus 4</button> |
76 |
| - </div> |
77 |
| - <button mat-button #button1 [disabled]="isDisabled" (click)="clickCounter=clickCounter+1">off</button> |
78 |
| - <button mat-button #button2 color="primary" [disabled]="isDisabled">off</button> |
79 |
| - <a href="http://www.google.com" #button3 mat-button color="accent" [disabled]="isDisabled">off</a> |
80 |
| - <button mat-raised-button #button4 color="primary" [disabled]="isDisabled">off</button> |
81 |
| - <button mat-mini-fab [disabled]="isDisabled"> |
82 |
| - <mat-icon>check</mat-icon> |
83 |
| - </button> |
84 |
| - |
85 |
| - <button mat-icon-button color="accent" [disabled]="isDisabled"> |
86 |
| - <mat-icon>favorite</mat-icon> |
87 |
| - </button> |
88 |
| - </section> |
89 |
| - <section> |
90 |
| - <a href="http://www.google.com" mat-button color="primary">SEARCH</a> |
91 |
| - <button mat-button>DANCE</button> |
92 |
| - </section> |
93 |
| - <section> |
94 |
| - <a href="http://www.google.com" mat-raised-button color="primary">SEARCH</a> |
95 |
| - <button mat-raised-button>DANCE</button> |
| 56 | + <button mat-icon-button color="primary"><mat-icon>cached</mat-icon></button> |
| 57 | + <button mat-icon-button color="accent"><mat-icon>backup</mat-icon></button> |
| 58 | + <button mat-icon-button color="warn"><mat-icon>trending_up</mat-icon></button> |
| 59 | + <button mat-icon-button disabled><mat-icon>visibility</mat-icon></button> |
96 | 60 | </section>
|
| 61 | + |
| 62 | + <h4 class="section-header">Fab Buttons [mat-fab]</h4> |
97 | 63 | <section>
|
98 |
| - <button mat-raised-button>More<mat-icon>more_vert</mat-icon></button> |
99 |
| - <button mat-raised-button>Check<mat-icon>check</mat-icon></button> |
100 |
| - <button mat-raised-button>Check<mat-icon>favorite</mat-icon></button> |
101 |
| - <button mat-raised-button>Last<mat-icon>navigate_before</mat-icon></button> |
| 64 | + <button mat-fab color="primary"><mat-icon>delete</mat-icon></button> |
| 65 | + <button mat-fab color="accent"><mat-icon>bookmark</mat-icon></button> |
| 66 | + <button mat-fab color="warn"><mat-icon>home</mat-icon></button> |
| 67 | + <button mat-fab disabled><mat-icon>favorite</mat-icon></button> |
102 | 68 | </section>
|
| 69 | + |
| 70 | + <h4 class="section-header"> Mini Fab Buttons [mat-mini-fab]</h4> |
103 | 71 | <section>
|
104 |
| - <button mat-button>More<mat-icon>more_vert</mat-icon></button> |
105 |
| - <button mat-button>Check<mat-icon>check</mat-icon></button> |
106 |
| - <button mat-button>Check<mat-icon>favorite</mat-icon></button> |
107 |
| - <button mat-button>Last<mat-icon>navigate_before</mat-icon></button> |
| 72 | + <button mat-mini-fab color="primary"><mat-icon>menu</mat-icon></button> |
| 73 | + <button mat-mini-fab color="accent"><mat-icon>plus_one</mat-icon></button> |
| 74 | + <button mat-mini-fab color="warn"><mat-icon>filter_list</mat-icon></button> |
| 75 | + <button mat-mini-fab disabled><mat-icon>home</mat-icon></button> |
108 | 76 | </section>
|
109 |
| - <section> |
110 |
| - <button mat-raised-button [disabled]="toggleDisable" (click)="toggleDisable = true">Disable</button> |
111 |
| - <button mat-button [disabled]="!toggleDisable" (click)="toggleDisable = false">Disable</button> |
| 77 | + |
| 78 | + <h4 class="section-header">Interaction/State</h4> |
| 79 | + <section class="no-flex"> |
| 80 | + <div> |
| 81 | + <p>isDisabled: {{isDisabled}}</p> |
| 82 | + <p>Button 1 as been clicked {{clickCounter}} times</p> |
| 83 | + <button mat-flat-button (click)="isDisabled=!isDisabled"> |
| 84 | + {{isDisabled ? 'Enable All' : 'Disable All'}} |
| 85 | + </button> |
| 86 | + <button mat-flat-button (click)="button1.focus()">Focus 1</button> |
| 87 | + <button mat-flat-button (click)="button2.focus()">Focus 2</button> |
| 88 | + <button mat-flat-button (click)="button3.focus()">Focus 3</button> |
| 89 | + <button mat-flat-button (click)="button4.focus()">Focus 4</button> |
| 90 | + </div> |
| 91 | + <div> |
| 92 | + <button mat-button #button1 [disabled]="isDisabled" |
| 93 | + (click)="clickCounter=clickCounter+1"> |
| 94 | + Button 1 |
| 95 | + </button> |
| 96 | + <button mat-button #button2 color="primary" [disabled]="isDisabled"> |
| 97 | + Button 2 |
| 98 | + </button> |
| 99 | + <a href="//www.google.com" #button3 mat-button color="accent" |
| 100 | + [disabled]="isDisabled"> |
| 101 | + Button 3 |
| 102 | + </a> |
| 103 | + <button mat-raised-button #button4 color="primary" |
| 104 | + [disabled]="isDisabled"> |
| 105 | + Button 4 |
| 106 | + </button> |
| 107 | + <button mat-mini-fab [disabled]="isDisabled"> |
| 108 | + <mat-icon>check</mat-icon> |
| 109 | + </button> |
| 110 | + <button mat-icon-button color="accent" [disabled]="isDisabled"> |
| 111 | + <mat-icon>favorite</mat-icon> |
| 112 | + </button> |
| 113 | + </div> |
112 | 114 | </section>
|
113 | 115 | </div>
|
0 commit comments