storybook/docs/snippets/vue/button-story-with-emojis.ts.mdx
2023-12-27 20:47:00 +00:00

41 lines
918 B
Plaintext

```ts
// Button.stories.ts
import type { Meta, StoryObj } from '@storybook/vue3';
import Button from './Button.vue';
const meta: Meta<typeof Button> = {
component: Button,
};
export default meta;
type Story = StoryObj<typeof Button>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/api/csf
* to learn how to use render functions.
*/
export const Primary: Story = {
render: () => ({
components: { Button },
template: '<Button background="#ff0" label="Button" />',
}),
};
export const Secondary: Story = {
render: () => ({
components: { Button },
template: '<Button background="#ff0" label="😄👍😍💯" />',
}),
};
export const Tertiary: Story = {
render: () => ({
components: { Button },
template: '<Button background="#ff0" label="📚📕📈🤓" />',
}),
};
```