Skip to content

Commit 4797cff

Browse files
committed
add more detailed code examples
1 parent 55bf623 commit 4797cff

File tree

1 file changed

+53
-20
lines changed

1 file changed

+53
-20
lines changed
Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { Story } from '@storybook/web-components';
12
import '@umbraco-ui/uui-action-bar/lib';
23
import '@umbraco-ui/uui-button/lib';
34
import '@umbraco-ui/uui-icon/lib';
@@ -14,51 +15,83 @@ export default {
1415
id: 'uui-action-bar',
1516
title: 'Buttons/Action Bar',
1617
component: 'uui-action-bar',
17-
parameters: {
18-
docs: {
19-
source: {
20-
code: `<uui-action-bar>...</uui-action-bar>`,
18+
args: {
19+
look: '',
20+
},
21+
argTypes: {
22+
look: {
23+
control: {
24+
type: 'select',
2125
},
26+
options: InterfaceLookNames,
2227
},
2328
},
2429
};
2530

2631
const buttons = ['copy', 'remove', 'delete'];
2732

28-
export const Basic = () =>
29-
html`
30-
<uui-icon-registry-essential>
31-
<uui-action-bar
32-
>${buttons.map(
33-
el =>
34-
html`<uui-button><uui-icon name="${el}"></uui-icon></uui-button>`
35-
)}
36-
</uui-action-bar>
37-
</uui-icon-registry-essential>
38-
`;
33+
export const AAAOverview: Story = props => html`
34+
<uui-icon-registry-essential>
35+
<uui-action-bar
36+
>${buttons.map(
37+
el => html` <uui-button label="${el}" look="${props.look}">
38+
<uui-icon name="${el}"></uui-icon>
39+
</uui-button>`
40+
)}
41+
</uui-action-bar>
42+
</uui-icon-registry-essential>
43+
`;
44+
45+
AAAOverview.storyName = 'Overview';
3946

4047
export const Single = () =>
4148
html`
4249
<uui-icon-registry-essential>
4350
<uui-action-bar>
44-
<uui-button look="outline"
51+
<uui-button label="Delete" look="outline"
4552
><uui-icon name="delete"></uui-icon
4653
></uui-button>
4754
</uui-action-bar>
4855
</uui-icon-registry-essential>
4956
`;
5057

51-
export const AllStyles = () => html`
58+
export const Looks = () => html`
5259
<uui-icon-registry-essential>
5360
${InterfaceLookNames.map(
5461
(lookName: InterfaceLookType) =>
55-
html` <uui-action-bar>
62+
html` <div>${lookName}</div>
63+
<uui-action-bar>
5664
${buttons.map(
57-
button => html`<uui-button .look=${lookName}>
65+
button => html`<uui-button label="${button}" .look=${lookName}>
5866
<uui-icon name="${button}"></uui-icon>
5967
</uui-button>`
6068
)} </uui-action-bar
61-
><br /><br /><br />`
69+
><br /><br />`
6270
)}
6371
</uui-icon-registry-essential>
6472
`;
73+
74+
Looks.parameters = {
75+
docs: {
76+
source: {
77+
code: `
78+
<uui-icon-registry-essential>
79+
<uui-action-bar>
80+
81+
<uui-button look="[look]" label="Copy">
82+
<uui-icon name="copy"></uui-icon>
83+
</uui-button>
84+
85+
<uui-button look="[look]" label="Remove">
86+
<uui-icon name="remove"></uui-icon>
87+
</uui-button>
88+
89+
<uui-button look="[look]" label="Delete">
90+
<uui-icon name="delete"></uui-icon>
91+
</uui-button>
92+
93+
</uui-action-bar>
94+
</uui-icon-registry-essential>`,
95+
},
96+
},
97+
};

0 commit comments

Comments
 (0)