@toptal/davinci-code
Version:
Code generation package for frontend applications
23 lines (19 loc) • 881 B
text/troff
to: src/modules/<%= h.changeCase.paramCase(moduleName) %>/components/<%= h.changeCase.pascalCase(name) %>/<%= h.changeCase.pascalCase(name) %>.stories.tsx
import React, { ComponentProps } from 'react'
<% if (picassoQuestion) { -%>
import { PicassoDecorator } from '@toptal/davinci-storybook-decorators'
<% } -%>
import <%= h.changeCase.pascalCase(name) %> from './<%= h.changeCase.pascalCase(name) %>'
export default {
component: <%= h.changeCase.pascalCase(name) %>,
<% if (picassoQuestion) { -%>
decorators: [PicassoDecorator],
<% } -%>
}
// You can override this example or export your own
// Read more about on https://storybook.js.org/docs/react/writing-stories/introduction
export const ExampleStory = (args: ComponentProps<<%= h.changeCase.pascalCase(name) %>>) => (
<<%= h.changeCase.pascalCase(name) %> {...args}></<%= h.changeCase.pascalCase(name) %>>
)