UNPKG

@storybook/codemod

Version:

A collection of codemod scripts written with JSCodeshift

26 lines (24 loc) 562 B
/** * Convert a legacy story API to component story format * * For example: * * ``` * input { Button } from './Button'; * storiesOf('Button', module).add('story', () => <Button label="The Button" />); * ``` * * Becomes: * * ``` * input { Button } from './Button'; * export default { * title: 'Button' * } * export const story = () => <Button label="The Button" />; * * NOTES: only support chained storiesOf() calls * ``` */ declare function transformer(file: any, api: any, options: any): Promise<any>; export { transformer as default };