feat: more storybook stories

This commit is contained in:
liyasthomas
2021-08-03 00:23:04 +05:30
parent d84e2a8e9b
commit d9834d0fd1
30 changed files with 357 additions and 40 deletions

View File

@@ -1,7 +0,0 @@
export default {
title: "Button",
}
export const PrimaryButton = () => `<ButtonPrimary label="Primary" />`
export const SecondaryButton = () => `<ButtonSecondary label="Secondary" />`

View File

@@ -0,0 +1,17 @@
import Primary from "./Primary.vue"
export default {
component: Primary,
title: "Components/Button",
}
const Template = (_args, { argTypes }) => ({
components: { Primary },
props: Object.keys(argTypes),
template: `<ButtonPrimary v-bind="$props" v-on="$props" />`,
})
export const ButtonPrimary = Template.bind({})
ButtonPrimary.args = {
label: "Primary",
}

View File

@@ -0,0 +1,17 @@
import Secondary from "./Secondary.vue"
export default {
component: Secondary,
title: "Components/Button",
}
const Template = (_args, { argTypes }) => ({
components: { Secondary },
props: Object.keys(argTypes),
template: `<ButtonSecondary v-bind="$props" v-on="$props" />`,
})
export const ButtonSecondary = Template.bind({})
ButtonSecondary.args = {
label: "Secondary",
}