|
1 |
| -<!-- TODO: copy in demo template from existing mat-button demo. --> |
2 |
| -Not yet implemented. |
| 1 | +<div class="demo-button"> |
| 2 | + <h4 class="demo-section-header">Buttons</h4> |
| 3 | + <section> |
| 4 | + <button mat-button>normal</button> |
| 5 | + <button mat-raised-button>raised</button> |
| 6 | + <button mat-stroked-button>stroked</button> |
| 7 | + <button mat-flat-button>flat</button> |
| 8 | + <button mat-fab> |
| 9 | + <mat-icon>check</mat-icon> |
| 10 | + </button> |
| 11 | + <button mat-mini-fab> |
| 12 | + <mat-icon>check</mat-icon> |
| 13 | + </button> |
| 14 | + </section> |
| 15 | + |
| 16 | + <h4 class="demo-section-header">Anchors</h4> |
| 17 | + <section> |
| 18 | + <a href="//www.google.com" mat-button color="primary">SEARCH</a> |
| 19 | + <a href="//www.google.com" mat-raised-button>SEARCH</a> |
| 20 | + <a href="//www.google.com" mat-stroked-button color="primary">SEARCH</a> |
| 21 | + <a href="//www.google.com" mat-flat-button>SEARCH</a> |
| 22 | + <a href="//www.google.com" mat-fab> |
| 23 | + <mat-icon>check</mat-icon> |
| 24 | + </a> |
| 25 | + <a href="//www.google.com" mat-mini-fab> |
| 26 | + <mat-icon>check</mat-icon> |
| 27 | + </a> |
| 28 | + </section> |
| 29 | + |
| 30 | + <h4 class="demo-section-header">Text Buttons [mat-button]</h4> |
| 31 | + <section> |
| 32 | + <button mat-button color="primary">primary</button> |
| 33 | + <button mat-button color="accent">accent</button> |
| 34 | + <button mat-button color="warn">warn</button> |
| 35 | + <button mat-button disabled>disabled</button> |
| 36 | + </section> |
| 37 | + |
| 38 | + <h4 class="demo-section-header">Raised Buttons [mat-raised-button]</h4> |
| 39 | + <section> |
| 40 | + <button mat-raised-button color="primary">primary</button> |
| 41 | + <button mat-raised-button color="accent">accent</button> |
| 42 | + <button mat-raised-button color="warn">warn</button> |
| 43 | + <button mat-raised-button disabled>disabled</button> |
| 44 | + </section> |
| 45 | + |
| 46 | + <h4 class="demo-section-header">Stroked Buttons [mat-stroked-button]</h4> |
| 47 | + <section> |
| 48 | + <button mat-stroked-button color="primary">primary</button> |
| 49 | + <button mat-stroked-button color="accent">accent</button> |
| 50 | + <button mat-stroked-button color="warn">warn</button> |
| 51 | + <button mat-stroked-button disabled>disabled</button> |
| 52 | + </section> |
| 53 | + |
| 54 | + <h4 class="demo-section-header">Flat Buttons [mat-flat-button]</h4> |
| 55 | + <section> |
| 56 | + <button mat-flat-button color="primary">primary</button> |
| 57 | + <button mat-flat-button color="accent">accent</button> |
| 58 | + <button mat-flat-button color="warn">warn</button> |
| 59 | + <button mat-flat-button disabled>disabled</button> |
| 60 | + </section> |
| 61 | + |
| 62 | + <h4 class="demo-section-header"> Icon Buttons [mat-icon-button]</h4> |
| 63 | + <section> |
| 64 | + <button mat-icon-button color="primary"> |
| 65 | + <mat-icon>cached</mat-icon> |
| 66 | + </button> |
| 67 | + <button mat-icon-button color="accent"> |
| 68 | + <mat-icon>backup</mat-icon> |
| 69 | + </button> |
| 70 | + <button mat-icon-button color="warn"> |
| 71 | + <mat-icon>trending_up</mat-icon> |
| 72 | + </button> |
| 73 | + <button mat-icon-button disabled> |
| 74 | + <mat-icon>visibility</mat-icon> |
| 75 | + </button> |
| 76 | + </section> |
| 77 | + |
| 78 | + <h4 class="demo-section-header">Fab Buttons [mat-fab]</h4> |
| 79 | + <section> |
| 80 | + <button mat-fab color="primary"> |
| 81 | + <mat-icon>delete</mat-icon> |
| 82 | + </button> |
| 83 | + <button mat-fab color="accent"> |
| 84 | + <mat-icon>bookmark</mat-icon> |
| 85 | + </button> |
| 86 | + <button mat-fab color="warn"> |
| 87 | + <mat-icon>home</mat-icon> |
| 88 | + </button> |
| 89 | + <button mat-fab disabled> |
| 90 | + <mat-icon>favorite</mat-icon> |
| 91 | + </button> |
| 92 | + </section> |
| 93 | + |
| 94 | + <h4 class="demo-section-header"> Mini Fab Buttons [mat-mini-fab]</h4> |
| 95 | + <section> |
| 96 | + <button mat-mini-fab color="primary"> |
| 97 | + <mat-icon>menu</mat-icon> |
| 98 | + </button> |
| 99 | + <button mat-mini-fab color="accent"> |
| 100 | + <mat-icon>plus_one</mat-icon> |
| 101 | + </button> |
| 102 | + <button mat-mini-fab color="warn"> |
| 103 | + <mat-icon>filter_list</mat-icon> |
| 104 | + </button> |
| 105 | + <button mat-mini-fab disabled> |
| 106 | + <mat-icon>home</mat-icon> |
| 107 | + </button> |
| 108 | + </section> |
| 109 | + |
| 110 | + <h4 class="demo-section-header">Interaction/State</h4> |
| 111 | + <section class="demo-no-flex"> |
| 112 | + <div> |
| 113 | + <p>isDisabled: {{isDisabled}}</p> |
| 114 | + <p>Button 1 as been clicked {{clickCounter}} times</p> |
| 115 | + <button mat-flat-button (click)="isDisabled=!isDisabled"> |
| 116 | + {{isDisabled ? 'Enable All' : 'Disable All'}} |
| 117 | + </button> |
| 118 | + <button mat-flat-button (click)="button1.focus()">Focus 1</button> |
| 119 | + <button mat-flat-button (click)="button2.focus()">Focus 2</button> |
| 120 | + <button mat-flat-button (click)="button3.focus()">Focus 3</button> |
| 121 | + <button mat-flat-button (click)="button4.focus()">Focus 4</button> |
| 122 | + </div> |
| 123 | + <div> |
| 124 | + <button mat-button #button1 [disabled]="isDisabled" |
| 125 | + (click)="clickCounter=clickCounter+1"> |
| 126 | + Button 1 |
| 127 | + </button> |
| 128 | + <button mat-button #button2 color="primary" [disabled]="isDisabled"> |
| 129 | + Button 2 |
| 130 | + </button> |
| 131 | + <a href="//www.google.com" #button3 mat-button color="accent" |
| 132 | + [disabled]="isDisabled"> |
| 133 | + Button 3 |
| 134 | + </a> |
| 135 | + <button mat-raised-button #button4 color="primary" |
| 136 | + [disabled]="isDisabled"> |
| 137 | + Button 4 |
| 138 | + </button> |
| 139 | + <button mat-mini-fab [disabled]="isDisabled"> |
| 140 | + <mat-icon>check</mat-icon> |
| 141 | + </button> |
| 142 | + <button mat-icon-button color="accent" [disabled]="isDisabled"> |
| 143 | + <mat-icon>favorite</mat-icon> |
| 144 | + </button> |
| 145 | + </div> |
| 146 | + </section> |
| 147 | +</div> |
0 commit comments