Skip to content

Instantly share code, notes, and snippets.

@Sanchithasharma
Created October 28, 2022 12:25
Show Gist options
  • Save Sanchithasharma/7771609a4889a2e7f8fb650529ddda85 to your computer and use it in GitHub Desktop.
Save Sanchithasharma/7771609a4889a2e7f8fb650529ddda85 to your computer and use it in GitHub Desktop.
Writing story with args
import TextButton from "./TextButton"
import { ComponentMeta, ComponentStory} from "@storybook/react"
export default {
title: "Components/Button",
component: TextButton,
} as ComponentMeta<typeof TextButton>
const Template: ComponentStory<typeof TextButton> = (args) => <TextButton {...args} />;
export const Submit = Template.bind({});
Submit.args = {
label: 'Button',
};
export const Check = Template.bind({});
Check.args = {
label: 'Button',
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment