← All dev blog posts

Storybook .stories Quickstart

10 August 2022

Code for starting a story quickly

import { ComponentMeta, ComponentStory } from'@storybook/react'
exportdefault {
title:'Components/COMPONENT-NAME',
component:COMPONENT-NAME,
} asComponentMeta<typeofCOMPONENT-NAME>
constTemplate: ComponentStory<typeofCOMPONENT-NAME> = (args) =><COMPONENT-NAME{...args}/>
exportconstDefault = Template.bind({})