UNPKG

@storybook/codemod

Version:

A collection of codemod scripts written with JSCodeshift

27 lines (25 loc) 452 B
/** * Hoist CSF .story annotations * * @example * * ```jsx * export const Basic = () => <Button /> * Basic.story = { * name: 'foo', * parameters: { }, * decorators = [ ], * }; * ``` * * Becomes: * * ``` * export const Basic = () => <Button />; * Basic.storyName = 'foo'; * Basic.parameters = {}; * Basic.decorators = []; * ``` */ declare function transformer(file: any, api: any): any; export { transformer as default };