Skip to content

Commit 9907a88

Browse files
committed
docs(button): add stroked buttons to examples
Adds the stroked buttons to the button varieties example and includes some margin so the buttons don't stick together. Fixes #11379.
1 parent abc3d38 commit 9907a88

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

src/lib/button/button.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ There are five button variants, each applied as an attribute:
2222

2323
### Theming
2424
Buttons can be colored in terms of the current theme using the `color` property to set the
25-
background color to `primary`, `accent`, or `warn`. By default, only FABs (Floating Action Button)
26-
are colored; the default background color for `mat-button` and `mat-raised-button` matches the theme's
27-
background color.
25+
background color to `primary`, `accent`, or `warn`. By default, only FABs (Floating Action Button)
26+
are colored; the default background color for `mat-button` and `mat-raised-button` matches the
27+
theme's background color.
2828

2929
### Capitalization
3030
According to the Material design spec button text has to be capitalized, however we have opted not
@@ -39,5 +39,5 @@ default. The `<button>` element should be used for any interaction that _perform
3939
current page_. The `<a>` element should be used for any interaction that _navigates to another
4040
view_.
4141

42-
Buttons or links containing only icons (such as `mat-fab`, `mat-mini-fab`, and `mat-icon-button`) should
43-
be given a meaningful label via `aria-label` or `aria-labelledby`.
42+
Buttons or links containing only icons (such as `mat-fab`, `mat-mini-fab`, and `mat-icon-button`)
43+
should be given a meaningful label via `aria-label` or `aria-labelledby`.

src/material-examples/button-types/button-types-example.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
align-items: center;
44
justify-content: space-around;
55
}
6+
7+
.example-button-row button,
8+
.example-button-row a {
9+
margin-right: 8px;
10+
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ <h3>Raised Buttons</h3>
1818
<a mat-raised-button routerLink=".">Link</a>
1919
</div>
2020

21+
<h3>Stroked Buttons</h3>
22+
<div class="button-row">
23+
<button mat-stroked-button>Basic</button>
24+
<button mat-stroked-button color="primary">Primary</button>
25+
<button mat-stroked-button color="accent">Accent</button>
26+
<button mat-stroked-button color="warn">Warn</button>
27+
<button mat-stroked-button disabled>Disabled</button>
28+
<a mat-stroked-button routerLink=".">Link</a>
29+
</div>
30+
2131
<h3>Icon Buttons</h3>
2232
<div class="button-row">
2333
<button mat-icon-button>

0 commit comments

Comments
 (0)