storiesof-to-csf.d.ts 546 B

123456789101112131415161718192021222324
  1. /**
  2. * Convert a legacy story API to component story format
  3. *
  4. * For example:
  5. *
  6. * ```
  7. * input { Button } from './Button';
  8. * storiesOf('Button', module).add('story', () => <Button label="The Button" />);
  9. * ```
  10. *
  11. * Becomes:
  12. *
  13. * ```
  14. * input { Button } from './Button';
  15. * export default {
  16. * title: 'Button'
  17. * }
  18. * export const story = () => <Button label="The Button" />;
  19. *
  20. * NOTES: only support chained storiesOf() calls
  21. */
  22. declare function transformer(file: any, api: any, options: any): any;
  23. export { transformer as default };