Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit a7d1701

Browse files
authored
Add example components (#45)
1 parent 0661753 commit a7d1701

File tree

98 files changed

+1272
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1272
-29
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.example-selected-value {
2+
margin: 15px 0;
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<md-button-toggle-group #group="mdButtonToggleGroup">
2+
<md-button-toggle value="left">
3+
<md-icon>format_align_left</md-icon>
4+
</md-button-toggle>
5+
<md-button-toggle value="center">
6+
<md-icon>format_align_center</md-icon>
7+
</md-button-toggle>
8+
<md-button-toggle value="right">
9+
<md-icon>format_align_right</md-icon>
10+
</md-button-toggle>
11+
<md-button-toggle value="justify" disabled>
12+
<md-icon>format_align_justify</md-icon>
13+
</md-button-toggle>
14+
</md-button-toggle-group>
15+
<div class="example-selected-value">Selected value: {{group.value}}</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'button-toggle-exclusive-example',
6+
templateUrl: './button-toggle-exclusive-example.html',
7+
styleUrls: ['./button-toggle-exclusive-example.css'],
8+
})
9+
export class ButtonToggleExclusiveExample {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<md-button-toggle>Toggle me!</md-button-toggle>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {Component} from '@angular/core';
2+
3+
4+
@Component({
5+
selector: 'button-toggle-overview-example',
6+
templateUrl: './button-toggle-overview-example.html',
7+
})
8+
export class ButtonToggleOverviewExample {}

src/app/examples/button-types/button-types-example.scss renamed to src/app/examples/button-types/button-types-example.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.example {
1+
.example-container {
22
width: 500px;
33
}
44

5-
.button-row {
5+
.example-button-row {
66
display: flex;
77
align-items: center;
88
justify-content: space-around;

src/app/examples/button-types/button-types-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="example">
1+
<div class="example-container">
22
<h3>Normal Buttons</h3>
33
<div class="button-row">
44
<button md-button>Flat button</button>
@@ -8,7 +8,7 @@ <h3>Normal Buttons</h3>
88
</div>
99

1010
<h3>Link Buttons</h3>
11-
<div class="button-row">
11+
<div class="example-button-row">
1212
<a md-button routerLink=".">Flat button</a>
1313
<a md-raised-button routerLink=".">Raised button</a>
1414
<a md-fab routerLink="."><md-icon>check</md-icon></a>

src/app/examples/button-types/button-types-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import {Component} from '@angular/core';
44
@Component({
55
selector: 'button-types-example',
66
templateUrl: './button-types-example.html',
7-
styleUrls: ['./button-types-example.scss'],
7+
styleUrls: ['./button-types-example.css'],
88
})
99
export class ButtonTypesExample {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.example-card {
2+
width: 400px;
3+
}
4+
5+
.example-header-image {
6+
background-image: url('shiba1.jpg');
7+
background-size: cover;
8+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<md-card class="example-card">
2+
<md-card-header>
3+
<div md-card-avatar class="example-header-image"></div>
4+
<md-card-title>Shiba Inu</md-card-title>
5+
<md-card-subtitle>Dog Breed</md-card-subtitle>
6+
</md-card-header>
7+
<img md-card-image src="shiba2.jpg">
8+
<md-card-content>
9+
<p>
10+
The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
11+
A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally
12+
bred for hunting.
13+
</p>
14+
</md-card-content>
15+
<md-card-actions>
16+
<button md-button>LIKE</button>
17+
<button md-button>SHARE</button>
18+
</md-card-actions>
19+
</md-card>

0 commit comments

Comments
 (0)