Skip to content

Commit 7eaccea

Browse files
committed
fixed Dialog stories
1 parent c458480 commit 7eaccea

File tree

2 files changed

+32
-54
lines changed

2 files changed

+32
-54
lines changed

packages/uui-dialog-layout/lib/uui-dialog-layout.story.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { html } from 'lit-html';
55

66
export default {
77
id: 'uui-dialog-layout',
8-
title: 'Dialog Layout',
8+
title: 'Displays/Dialog Layout',
99
component: 'uui-dialog-layout',
1010
parameters: {
1111
docs: {

packages/uui-dialog/lib/uui-dialog.story.ts

Lines changed: 31 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -12,75 +12,53 @@ export default {
1212

1313
const Template: Story = () => html`
1414
<uui-dialog>
15-
<h4>Short headline</h4>
16-
<p>
17-
Make a short description and <b>highlight</b> the affected data.<br /><br />
18-
Keep actions concrete, if asking a question in headline make sure to have
19-
actions that answers it.
20-
</p>
21-
<uui-button slot="actions">Cancel</uui-button>
22-
<uui-button slot="actions" look="positive">Action</uui-button>
15+
<uui-dialog-layout headline="Short headline">
16+
<p>
17+
Make a short description and <b>highlight</b> the affected data.<br /><br />
18+
Keep actions concrete, if asking a question in headline make sure to
19+
have actions that answers it.
20+
</p>
21+
<uui-button slot="actions">Cancel</uui-button>
22+
<uui-button slot="actions" look="positive">Action</uui-button>
23+
</uui-dialog-layout>
2324
</uui-dialog>
2425
`;
2526

2627
export const AAAOverview = Template.bind({});
2728
AAAOverview.storyName = 'Overview';
2829

29-
export const Test = () => html`
30+
export const ConfirmDialogPositive: Story = () => html`
3031
<uui-dialog>
31-
<uui-dialog-layout>
32-
<div>
33-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Asperiores quae
34-
iusto porro impedit quasi odit, nihil facere pariatur vero! Quaerat sint
35-
tempore ullam corporis nihil dolorum cum consequuntur ad provident.
36-
</div>
32+
<uui-dialog-layout headline="Publish with descendants">
33+
<p>
34+
Publish <b>This example</b> and all content items underneath and thereby
35+
making their content publicly available.
36+
</p>
3737
<uui-button slot="actions">Cancel</uui-button>
38-
<uui-button slot="actions" look="positive">Save</uui-button>
38+
<uui-button slot="actions" look="positive">Publish</uui-button>
3939
</uui-dialog-layout>
4040
</uui-dialog>
4141
`;
4242

43-
export const Slots: Story = () => html`
44-
<uui-dialog>
45-
<uui-button disabled look="placeholder" style="width:100%; height: 96px;">
46-
Default slot
47-
</uui-button>
48-
<uui-button disabled look="placeholder" style="width:50%;" slot="actions">
49-
Actions slot
50-
</uui-button>
51-
</uui-dialog>
52-
`;
53-
54-
Slots.parameters = {
55-
docs: {
56-
source: {
57-
code: `
58-
<uui-dialog>
59-
<div>Default slot</div>
60-
<div slot="actions">Action</div>
61-
</uui-dialog>
62-
`,
63-
},
64-
},
65-
};
66-
67-
export const ConfirmDialogPositive: Story = () => html`
43+
export const ConfirmDialogDanger: Story = () => html`
6844
<uui-dialog>
69-
<h4>Publish with descendants</h4>
70-
<p>
71-
Publish <b>This example</b> and all content items underneath and thereby
72-
making their content publicly available.
73-
</p>
74-
<uui-button slot="actions">Cancel</uui-button>
75-
<uui-button slot="actions" look="positive">Publish</uui-button>
45+
<uui-dialog-layout headline="Delete">
46+
<p>Delete <b>This example</b> and all items underneath.</p>
47+
<uui-button slot="actions">Cancel</uui-button>
48+
<uui-button slot="actions" look="danger">Delete</uui-button>
49+
</uui-dialog-layout>
7650
</uui-dialog>
7751
`;
7852

79-
export const ConfirmDialogDanger: Story = () => html`
53+
export const HeadlineSlot: Story = () => html`
8054
<uui-dialog>
81-
<h4>Delete</h4>
82-
<p>Delete <b>This example</b> and all items underneath.</p>
83-
<uui-button slot="actions">Cancel</uui-button>
84-
<uui-button slot="actions" look="danger">Delete</uui-button>
55+
<uui-dialog-layout>
56+
<span slot="headline">
57+
<uui-icon name="crown-alt"></uui-icon> With Icon
58+
</span>
59+
<p>This is using a <b>slot</b> for the headline.</p>
60+
<uui-button slot="actions">Cancel</uui-button>
61+
<uui-button slot="actions" look="danger">Delete</uui-button>
62+
</uui-dialog-layout>
8563
</uui-dialog>
8664
`;

0 commit comments

Comments
 (0)