mirror of
https://github.com/ivabus/gui
synced 2025-06-07 15:50:27 +03:00
32 lines
731 B
TypeScript
32 lines
731 B
TypeScript
import Button from './Button.svelte';
|
|
|
|
// More on how to set up stories at: https://storybook.js.org/docs/7.0/svelte/writing-stories/introduction
|
|
export default {
|
|
title: 'Example/Button',
|
|
component: Button,
|
|
tags: ['docsPage'],
|
|
render: (args) => ({
|
|
Component: Button,
|
|
props: args,
|
|
on: {
|
|
click: args.onClick
|
|
}
|
|
}),
|
|
argTypes: {
|
|
backgroundColor: { control: 'color' },
|
|
label: { control: 'text' },
|
|
onClick: { action: 'onClick' },
|
|
primary: { control: 'boolean' },
|
|
size: {
|
|
control: { type: 'select' },
|
|
options: ['small', 'medium', 'large']
|
|
}
|
|
}
|
|
};
|
|
|
|
// More on writing stories with args: https://storybook.js.org/docs/7.0/svelte/writing-stories/args
|
|
export const Primary = {
|
|
args: {
|
|
primary: true
|
|
}
|
|
};
|