Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 31 additions & 36 deletions packages/uui-ref-node-data-type/lib/uui-ref-node-data-type.story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,30 @@ const meta: Meta = {
id: 'uui-ref-node-data-type',
component: 'uui-ref-node-data-type',
title: 'Displays/References/Data Type',
args: {
name: 'TextField',
alias: 'Umbraco.TextField',
},
render: args =>
html`<uui-ref-node-data-type ${spread(args)}
>${renderSlots(args)}</uui-ref-node-data-type
>`,
args: { name: 'TextField', alias: 'Umbraco.TextField' },
render: args => html`
<uui-ref-node-data-type ${spread(args)}>
${renderSlots(args)}
</uui-ref-node-data-type>
`,
decorators: [
(Story: any) => html`<div style="max-width: 420px;">${Story()}</div>`,
],
parameters: {
readme: {
markdown: readme,
},
},
parameters: { readme: { markdown: readme } },
};

export default meta;
type Story = StoryObj;

export const Default: Story = {
args: {
'actions slot': html`<uui-action-bar slot="actions"
><uui-button label="delete"
><uui-icon name="delete"></uui-icon></uui-button
></uui-action-bar>`,
'actions slot': html`
<uui-action-bar slot="actions">
<uui-button label="delete">
<uui-icon name="delete"></uui-icon>
</uui-button>
</uui-action-bar>
`,
},
};
export const CustomIcon: Story = {
Expand All @@ -43,26 +40,24 @@ export const CustomIcon: Story = {
},
};

export const Standalone: Story = {
args: {
standalone: true,
},
};
export const Standalone: Story = { args: { standalone: true } };

export const Selectable: Story = {
args: {
selectable: true,
},
};
export const Selectable: Story = { args: { selectable: true } };

export const Disabled: Story = {
args: {
disabled: true,
},
};
export const Disabled: Story = { args: { disabled: true } };

export const Readonly: Story = {
args: {
readonly: true,
},
export const Readonly: Story = { args: { readonly: true } };

export const Focus: Story = {
args: { id: 'refNode' },
decorators: [
(Story: any) => html`
<div style="max-width: 420px;">
${Story()}
<button @click=${() => document.getElementById('refNode')?.focus()}>
Set focus
</button>
</div>
`,
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,31 @@ const meta: Meta = {
id: 'uui-ref-node-document-type',
component: 'uui-ref-node-document-type',
title: 'Displays/References/Document Type',
args: {
name: 'Product Page',
alias: 'productPage',
},
render: args =>
html`<uui-ref-node-document-type ${spread(args)}
>${renderSlots(args)}</uui-ref-node-document-type
>`,
args: { name: 'Product Page', alias: 'productPage' },
render: args => html`
<uui-ref-node-document-type id="refNode" ${spread(args)}>
${renderSlots(args)}
</uui-ref-node-document-type>
`,

decorators: [
(Story: any) => html`<div style="max-width: 420px;">${Story()}</div>`,
],
parameters: {
readme: {
markdown: readme,
},
},
parameters: { readme: { markdown: readme } },
};

export default meta;
type Story = StoryObj;

export const Default: Story = {
args: {
'actions slot': html`<uui-action-bar slot="actions"
><uui-button label="delete"
><uui-icon name="delete"></uui-icon></uui-button
></uui-action-bar>`,
'actions slot': html`
<uui-action-bar slot="actions">
<uui-button label="delete">
<uui-icon name="delete"></uui-icon>
</uui-button>
</uui-action-bar>
`,
},
};
export const CustomIcon: Story = {
Expand All @@ -43,26 +41,24 @@ export const CustomIcon: Story = {
},
};

export const Standalone: Story = {
args: {
standalone: true,
},
};
export const Standalone: Story = { args: { standalone: true } };

export const Selectable: Story = {
args: {
selectable: true,
},
};
export const Selectable: Story = { args: { selectable: true } };

export const Disabled: Story = {
args: {
disabled: true,
},
};
export const Disabled: Story = { args: { disabled: true } };

export const Readonly: Story = {
args: {
readonly: true,
},
export const Readonly: Story = { args: { readonly: true } };

export const Focus: Story = {
args: { id: 'refNode' },
decorators: [
(Story: any) => html`
<div style="max-width: 420px;">
${Story()}
<button @click=${() => document.getElementById('refNode')?.focus()}>
Set focus
</button>
</div>
`,
],
};
61 changes: 29 additions & 32 deletions packages/uui-ref-node-form/lib/uui-ref-node-form.story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,28 @@ const meta: Meta = {
name: 'Newsletter Signup',
detail: 'Accept and signup for newsletter',
},
render: args =>
html`<uui-ref-node-form ${spread(args)}
>${renderSlots(args)}</uui-ref-node-form
>`,
render: args => html`
<uui-ref-node-form ${spread(args)}>
${renderSlots(args)}
</uui-ref-node-form>
`,
decorators: [
(Story: any) => html`<div style="max-width: 420px;">${Story()}</div>`,
],
parameters: {
readme: {
markdown: readme,
},
},
parameters: { readme: { markdown: readme } },
};

export default meta;
type Story = StoryObj;

export const Default: Story = {
args: {
'actions slot': html`<uui-action-bar slot="actions"
><uui-button label="delete"
><uui-icon name="delete"></uui-icon></uui-button
></uui-action-bar>`,
'actions slot': html`
<uui-action-bar slot="actions">
<uui-button label="delete"
><uui-icon name="delete"></uui-icon> </uui-button
></uui-action-bar>
`,
},
};
export const CustomIcon: Story = {
Expand All @@ -43,26 +42,24 @@ export const CustomIcon: Story = {
},
};

export const Standalone: Story = {
args: {
standalone: true,
},
};
export const Standalone: Story = { args: { standalone: true } };

export const Selectable: Story = {
args: {
selectable: true,
},
};
export const Selectable: Story = { args: { selectable: true } };

export const Disabled: Story = {
args: {
disabled: true,
},
};
export const Disabled: Story = { args: { disabled: true } };

export const Readonly: Story = {
args: {
readonly: true,
},
export const Readonly: Story = { args: { readonly: true } };

export const Focus: Story = {
args: { id: 'refNode' },
decorators: [
(Story: any) => html`
<div style="max-width: 420px;">
${Story()}
<button @click=${() => document.getElementById('refNode')?.focus()}>
Set focus
</button>
</div>
`,
],
};
58 changes: 26 additions & 32 deletions packages/uui-ref-node-member/lib/uui-ref-node-member.story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,29 @@ const meta: Meta = {
id: 'uui-ref-node-member',
component: 'uui-ref-node-member',
title: 'Displays/References/Member',
args: {
name: 'Arnold Vitz',
groupName: 'Visitor, Registered-Member',
},
args: { name: 'Arnold Vitz', groupName: 'Visitor, Registered-Member' },
render: args =>
html`<uui-ref-node-member ${spread(args)}
>${renderSlots(args)}</uui-ref-node-member
>`,
decorators: [
(Story: any) => html`<div style="max-width: 420px;">${Story()}</div>`,
],
parameters: {
readme: {
markdown: readme,
},
},
parameters: { readme: { markdown: readme } },
};

export default meta;
type Story = StoryObj;

export const Default: Story = {
args: {
'actions slot': html`<uui-action-bar slot="actions"
><uui-button label="delete"
><uui-icon name="delete"></uui-icon></uui-button
></uui-action-bar>`,
'actions slot': html`
<uui-action-bar slot="actions">
<uui-button label="delete">
<uui-icon name="delete"></uui-icon>
</uui-button>
</uui-action-bar>
`,
},
};
export const CustomIcon: Story = {
Expand All @@ -43,26 +39,24 @@ export const CustomIcon: Story = {
},
};

export const Standalone: Story = {
args: {
standalone: true,
},
};
export const Standalone: Story = { args: { standalone: true } };

export const Selectable: Story = {
args: {
selectable: true,
},
};
export const Selectable: Story = { args: { selectable: true } };

export const Disabled: Story = {
args: {
disabled: true,
},
};
export const Disabled: Story = { args: { disabled: true } };

export const Readonly: Story = {
args: {
readonly: true,
},
export const Readonly: Story = { args: { readonly: true } };

export const Focus: Story = {
args: { id: 'refNode' },
decorators: [
(Story: any) => html`
<div style="max-width: 420px;">
${Story()}
<button @click=${() => document.getElementById('refNode')?.focus()}>
Set focus
</button>
</div>
`,
],
};
Loading
Loading