nextui/plop/component/stories/{{componentName}}.stories.tsx.hbs
2023-03-14 21:40:22 -03:00

48 lines
1.2 KiB
Handlebars

import React from "react";
import {ComponentStory, ComponentMeta} from "@storybook/react";
import { {{componentName}} } from "@nextui-org/theme";
import { {{capitalize componentName}}, {{capitalize componentName}}Props } from "../src";
export default {
title: "Components/{{capitalize componentName}}",
component: {{capitalize componentName}},
argTypes: {
color: {
control: {
type: "select",
options: ["neutral", "primary", "secondary", "success", "warning", "danger"],
},
},
radius: {
control: {
type: "select",
options: ["none", "base", "sm", "md", "lg", "xl", "full"],
},
},
size: {
control: {
type: "select",
options: ["xs", "sm", "md", "lg", "xl"],
},
},
isDisabled: {
control: {
type: "boolean",
},
},
},
} as ComponentMeta<typeof {{capitalize componentName}}>;
const defaultProps = {
...{{componentName}}.defaultVariants,
};
const Template: ComponentStory<typeof {{capitalize componentName}}> = (args: {{capitalize componentName}}Props) => <{{capitalize componentName}} {...args} />;
export const Default = Template.bind({});
Default.args = {
...defaultProps,
};