This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(examples): add button basic usage
- Loading branch information
1 parent
ac175dd
commit c456f27
Showing
4 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
|
||
<md-content> | ||
|
||
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap> | ||
<button md-button>{{title1}}</button> | ||
<button md-button md-no-ink class="md-primary">Primary (md-noink)</button> | ||
<button md-button disabled="true" class="md-primary">Disabled</button> | ||
<button md-button class="md-warn">{{title4}}</button> | ||
<div class="label">Flat</div> | ||
</section> | ||
|
||
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap> | ||
<button md-raised-button class="md-raised">Button</button> | ||
<button md-raised-button class="md-raised md-primary">Primary</button> | ||
<button md-raised-button disabled="true" class="md-raised md-primary">Disabled</button> | ||
<button md-raised-button class="md-raised md-warn">Warn</button> | ||
<div class="label">Raised</div> | ||
</section> | ||
|
||
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap> | ||
<button md-fab class="md-fab" aria-label="Eat cake"> | ||
<i md-icon>cake</i> | ||
</button> | ||
|
||
<button md-fab class="md-primary" aria-label="Use Android"> | ||
<i md-icon>android</i> | ||
</button> | ||
|
||
<button md-fab disabled="true" aria-label="Comment"> | ||
<i md-icon>comment</i> | ||
</button> | ||
|
||
<button md-fab class="md-primary md-hue-2" aria-label="Profile"> | ||
<i md-icon>people</i> | ||
</button> | ||
|
||
<button md-fab class="md-mini" aria-label="Eat cake"> | ||
<i md-icon>cake</i> | ||
</button> | ||
|
||
<button md-fab class="md-mini md-primary" aria-label="Use Android"> | ||
<i md-icon>android</i> | ||
</button> | ||
<div class="label">FAB</div> | ||
</section> | ||
|
||
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap> | ||
<a md-button [href]="googleUrl" target="_blank">Default Link</a> | ||
<a md-button class="md-primary" [href]="googleUrl" target="_blank">Primary Link</a> | ||
|
||
<button md-button>Default Button</button> | ||
<div class="label">Link vs. Button</div> | ||
</section> | ||
|
||
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap> | ||
<button md-button class="md-primary md-hue-1">Primary Hue 1</button> | ||
<button md-raised-button class="md-warn md-hue-2">Warn Hue 2</button> | ||
<button md-button class="md-accent">Accent</button> | ||
<button md-raised-button class="md-accent md-hue-1">Accent Hue 1</button> | ||
<div class="label">Themed</div> | ||
</section> | ||
|
||
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap> | ||
<button md-button class="md-icon-button md-primary" aria-label="Settings"> | ||
<i md-icon>menu</i> | ||
</button> | ||
<button md-button class="md-icon-button md-accent" aria-label="Favorite"> | ||
<i md-icon>favorite</i> | ||
</button> | ||
<button md-button class="md-icon-button" aria-label="More"> | ||
<i md-icon>more_vert</i> | ||
</button> | ||
<a md-button href="http://google.com" | ||
title="Launch Google.com in new window" | ||
target="_blank" | ||
disabled="true" | ||
aria-label="Google.com" | ||
class="md-icon-button launch" > | ||
<i md-icon>launch</i> | ||
</a> | ||
<div class="label">Icon Button</div> | ||
</section> | ||
</md-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
section { | ||
background: #f7f7f7; | ||
border-radius: 3px; | ||
text-align: center; | ||
margin: 1em; | ||
position: relative !important; | ||
padding-bottom: 10px; | ||
} | ||
md-content { | ||
margin-right: 7px; | ||
} | ||
section .md-button { | ||
margin-top: 16px; | ||
margin-bottom: 16px; | ||
} | ||
.label { | ||
position: absolute; | ||
bottom: 5px; | ||
left: 7px; | ||
font-size: 14px; | ||
opacity: 0.54; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {View, Component} from 'angular2/core'; | ||
import {MATERIAL_DIRECTIVES} from '../../base'; | ||
|
||
|
||
@Component({selector: 'button-basic-usage'}) | ||
@View({ | ||
templateUrl: 'examples/components/button/basic_usage.html', | ||
styleUrls: ['examples/components/button/basic_usage.css'], | ||
directives: [MATERIAL_DIRECTIVES] | ||
}) | ||
export default class ButtonBasicUsage { | ||
googleUrl: string = 'https://www.google.com'; | ||
title1: string = 'Button'; | ||
title4: string = 'Warn'; | ||
isDisabled: boolean = true; | ||
|
||
} |