|
1 | 1 | import { html } from 'lit-html';
|
2 | 2 | import '@umbraco-ui/uui-button/lib/index';
|
3 |
| -// import '../uui-icon/index'; |
4 |
| -// import '../uui-badge/index'; |
| 3 | +import '@umbraco-ui/uui-icon/lib/index'; |
| 4 | +import '@umbraco-ui/uui-badge/lib/index'; |
| 5 | + |
5 | 6 | import {
|
6 | 7 | InterfaceLookNames,
|
7 | 8 | InterfaceLookType,
|
@@ -112,11 +113,12 @@ export const WithBadge: Story = props => {
|
112 | 113 | ?disabled=${props.disabled}
|
113 | 114 | look=${props.look}
|
114 | 115 | state=${props.state}>
|
115 |
| - <uui-badge slot="badge">!</uui-badge> |
| 116 | + <uui-badge>!</uui-badge> |
116 | 117 | I have a badge
|
117 | 118 | </uui-button>
|
118 | 119 | `;
|
119 | 120 | };
|
| 121 | +WithBadge.args = { look: 'primary' }; |
120 | 122 | WithBadge.parameters = {
|
121 | 123 | docs: {
|
122 | 124 | source: {
|
@@ -209,23 +211,23 @@ Looks.parameters = {
|
209 | 211 | },
|
210 | 212 | };
|
211 | 213 |
|
212 |
| -// export const WithIcon = () => html` |
213 |
| -// <uui-button look="danger"> |
214 |
| -// <uui-icon .name=${'bug'}></uui-icon> |
215 |
| -// </uui-button> |
216 |
| -// <br /> |
217 |
| -// <br /> |
218 |
| -// <uui-button look="danger"> |
219 |
| -// <uui-icon .name=${'bug'}></uui-icon><span>Hello button with icon</span> |
220 |
| -// </uui-button> |
221 |
| -// <br /> |
222 |
| -// <br /> |
223 |
| -// <p> |
224 |
| -// For buttons displaying an icon, its important to parse a aria-label |
225 |
| -// attribute to ensure accessibility. The default sixing for a button with just |
226 |
| -// a icon is generally too wide, there please use with the 'compact' attribute. |
227 |
| -// </p> |
228 |
| -// <uui-button look="positive" compact> |
229 |
| -// <uui-icon name="info"></uui-icon> |
230 |
| -// </uui-button> |
231 |
| -// `; |
| 214 | +export const WithIcon = () => html` |
| 215 | + <uui-button look="danger"> |
| 216 | + <uui-icon .name=${'bug'}></uui-icon> |
| 217 | + </uui-button> |
| 218 | + <br /> |
| 219 | + <br /> |
| 220 | + <uui-button look="danger"> |
| 221 | + <uui-icon .name=${'bug'}></uui-icon><span>Hello button with icon</span> |
| 222 | + </uui-button> |
| 223 | + <br /> |
| 224 | + <br /> |
| 225 | + <p> |
| 226 | + For buttons displaying an icon, its important to parse a aria-label |
| 227 | + attribute to ensure accessibility. The default sixing for a button with just |
| 228 | + a icon is generally too wide, there please use with the 'compact' attribute. |
| 229 | + </p> |
| 230 | + <uui-button look="positive" compact> |
| 231 | + <uui-icon name="info"></uui-icon> |
| 232 | + </uui-button> |
| 233 | +`; |
0 commit comments