mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
3.8 KiB
3.8 KiB
import { Meta, Story } from '@storybook/angular';
import { Button } from './button.component';
export default {
title: 'Button',
component: Button,
} as Meta;
export const Primary: Story = (args) => ({
props: args,
});
Primary.args = { primary: true };
import { Button } from './Button';
export default {
title: 'Button',
component: Button,
};
export const Primary = (args) => <Button {...args} />;
Primary.args = { primary: true };
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { Button } from './Button';
export default {
title: 'Button',
component: Button,
} as ComponentMeta<typeof Button>;
export const Primary: ComponentStory<typeof Button> = (args) => <Button {...args} />;
Primary.args = { primary: true };
import { Button } from './Button';
export default {
title: 'Button',
component: Button,
};
export const Primary = (args) => <Button {...args} />;
Primary.args = { primary: true };
import { ComponentStory, ComponentMeta } from 'storybook-solidjs';
import { Button } from './Button';
export default {
title: 'Button',
component: Button,
} as ComponentMeta<typeof Button>;
export const Primary: ComponentStory<typeof Button> = (args) => <Button {...args} />;
Primary.args = { primary: true };
import Button from './Button.svelte';
export default {
title: 'Button',
component: Button,
};
export const Primary = (args) => ({
Component: Button,
props: args,
});
Primary.args = { primary: true };
import type { Meta, StoryFn } from '@storybook/svelte';
import Button from './Button.svelte';
export default {
title: 'Button',
component: Button,
} as Meta<typeof Button>;
export const Primary: StoryFn<typeof Button> = (args) => ({
Component: Button,
props: args,
});
Primary.args = { primary: true };
import Button from './Button.vue';
export default {
title: 'Button',
component: Button,
};
export const Primary = (args) => ({
components: { Button },
setup() {
return { args };
},
template: '<Button v-bind="args" />',
});
Primary.args = { primary: true };
import { Meta, StoryFn } from '@storybook/vue3';
import Button from './Button.vue';
export default {
title: 'Button',
component: Button,
} as Meta<typeof Button>;
export const Primary: StoryFn<typeof Button> = (args) => ({
components: { Button },
setup() {
return { args };
},
template: '<Button v-bind="args" />',
});
Primary.args = { primary: true };
import { html } from 'lit';
export default {
title: 'components/Button',
component: 'demo-button',
};
export const Primary = ({ primary }) => html`<custom-button ?primary=${primary}></custom-button>`;
Primary.args = {
primary: true,
};
import type { Meta, Story } from '@storybook/web-components';
import { html } from 'lit';
export default {
title: 'components/Button',
component: 'demo-button',
} as Meta;
export const Primary: Story = ({ primary }) =>
html`<demo-button ?primary=${primary}></demo-button>`;
Primary.args = {
primary: true,
};