Skip to content

Commit 25a396d

Browse files
committed
docs(storybook): update story hbs template
1 parent 5cd4116 commit 25a396d

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

packages/uui-symbol-expand/lib/uui-symbol-expand.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export class UUISymbolExpandElement extends LitElement {
3535
* Set this boolean to true for a open/expanded look.
3636
* @type {boolean}
3737
* @default false
38+
* @attr
3839
*/
3940
@property({ type: Boolean, reflect: true })
4041
public open = false;
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import '.';
2-
3-
import { Story } from '@storybook/web-components';
1+
import type { Meta, StoryObj } from '@storybook/web-components';
42
import { html } from 'lit';
3+
4+
import './uui-symbol-expand.element';
5+
import type { UUISymbolExpandElement } from './uui-symbol-expand.element';
56
import readme from '../README.md?raw';
67

7-
export default {
8+
const meta: Meta<UUISymbolExpandElement> = {
89
id: 'uui-symbol-expand',
910
title: 'Symbols/Expand',
1011
component: 'uui-symbol-expand',
@@ -19,17 +20,16 @@ export default {
1920
args: {
2021
open: false,
2122
},
22-
argTypes: {
23-
value: {
24-
open: { type: 'boolean' },
25-
},
26-
},
2723
};
2824

29-
export const Overview: Story = props =>
30-
html`<uui-symbol-expand
25+
export default meta;
26+
type Story = StoryObj<UUISymbolExpandElement>;
27+
28+
export const Overview: Story = {
29+
render: props => html`<uui-symbol-expand
3130
?open=${props.open}
3231
@click=${(e: MouseEvent) => {
3332
(e.target as any).open = !(e.target as any).open;
3433
}}>
35-
</uui-symbol-expand>`;
34+
</uui-symbol-expand>`,
35+
};
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import '.';
1+
import type { Meta, StoryObj } from '@storybook/web-components';
22

3-
import { Story } from '@storybook/web-components';
4-
import { html } from 'lit';
3+
import './{{> tagnamePartial}}.element';
4+
import type { {{className name}} } from './{{> tagnamePartial}}.element';
55
import readme from '../README.md?raw';
66

7-
export default {
7+
const meta: Meta<{{className name}}> = {
88
id: '{{> tagnamePartial}}',
99
title: '{{displayName name}}',
1010
component: '{{> tagnamePartial}}',
@@ -18,5 +18,7 @@ export default {
1818
},
1919
};
2020

21-
export const Overview: Story = props =>
22-
html`<{{> tagnamePartial}}></{{> tagnamePartial}}>`;
21+
export default meta;
22+
type Story = StoryObj<{{className name}}>;
23+
24+
export const Overview: Story = {};

0 commit comments

Comments
 (0)