55Simplest use case: a button with text in it, telling the user what to do.
66
77``` handlebars
8- {{es-button label="click me"}}
8+ <EsButton @ label="click me" />
99```
1010
11-
1211Also supported- block use:
1312
1413``` handlebars
15- {{#es-button}}
14+ <EsButton>
1615 click me <span>🐹</span>
17- {{/es-button}}
18- ```
19-
20- To toggle the 'disabled' property, set 'isDisabled' to true
21-
22- ``` handlebars
23- {{es-button label="click me" isDisabled=true}}
16+ </EsButton>
2417```
2518
2619To add interactivity you can pass an action to ` onClicked `
@@ -33,37 +26,18 @@ To add interactivity you can pass an action to `onClicked`
3326{{value}}
3427```
3528
36- ## Styling Links
37- It is also possible to style a link to look like a button using the ` something ` class
38-
39- ``` html
40- <a href =" https://emberjs.com" class =" es-button" >Go to Ember homepage</a >
41- ```
42-
43- ## Styles
44-
45- Outline button style:
29+ ## Secondary Buttons
4630
4731``` handlebars
48- {{es-button label="click me" isDark=false}}
32+ <EsButton @ label="click me" @secondary={{true}} />
4933```
5034
51- Smaller button:
52-
53- ``` handlebars
54- {{es-button label="click me" isTiny=true}}
55- ```
56-
57- Less Padding:
58-
59- ``` handlebars
60- {{es-button label="click me" isDark=true isDense=true}}
61- ```
62-
63- Full-width button:
35+ ## Styling Links
36+ It is also possible to style a link to look like a button using the ` something ` class
6437
65- ``` handlebars
66- {{es-button label="click me" isBlock=true}}
38+ ``` html
39+ <a href =" https://emberjs.com" class =" es-button" >Go to Ember homepage</a >
40+ <a href =" https://guides.emberjs.com" class =" es-button-secondary" >Go to the Guides</a >
6741```
6842
6943## Accessibility
@@ -73,14 +47,7 @@ Since we're using the native HTML button element and requiring a label value to
7347If you are going to put an icon in the button, then you will need to set an aria-label property on the button:
7448
7549``` handlebars
76- {{#es-button ariaLabel ="Hamster Secrets" title="Hamster Secrets"}}
50+ <EsButton aria-label ="Hamster Secrets" title="Hamster Secrets">
7751 🐹
78- {{/es-button}}
52+ </EsButton>
7953```
80-
81- ## Other Uses
82-
83- There are some other ways this component could be used:
84-
85- - as a link
86- - as a toggle button (supports the aria-pressed attribute)
0 commit comments