mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 15:41:57 +08:00
33 lines
672 B
Plaintext
33 lines
672 B
Plaintext
```js
|
|
// Button.stories.js
|
|
|
|
import Button from './Button.vue';
|
|
|
|
export default {
|
|
component: Button,
|
|
};
|
|
|
|
// The render function is a framework specific construct to define how the story should render
|
|
|
|
export const Primary = {
|
|
render: () => ({
|
|
components: { Button },
|
|
template: '<Button backgroundColor="#ff0" label="Button" />',
|
|
}),
|
|
};
|
|
|
|
export const Secondary = {
|
|
render: () => ({
|
|
components: { Button },
|
|
template: '<Button backgroundColor="#ff0" label="😄👍😍💯" />',
|
|
}),
|
|
};
|
|
|
|
export const Tertiary = {
|
|
render: () => ({
|
|
components: { Button },
|
|
template: '<Button backgroundColor="#ff0" label="📚📕📈🤓" />',
|
|
}),
|
|
};
|
|
```
|