add-component-parameters.d.ts 594 B

12345678910111213141516171819202122
  1. /**
  2. * Adds a `component` parameter for each storiesOf(...) call.
  3. *
  4. * For example:
  5. *
  6. * input { Button } from './Button';
  7. * storiesOf('Button', module).add('story', () => <Button label="The Button" />);
  8. *
  9. * Becomes:
  10. *
  11. * input { Button } from './Button';
  12. * storiesOf('Button', module)
  13. * .addParameters({ component: Button })
  14. * .add('story', () => <Button label="The Button" />);
  15. *
  16. * Heuristics:
  17. * - The storiesOf "kind" name must be Button
  18. * - Button must be imported in the file
  19. */
  20. declare function transformer(file: any, api: any): any;
  21. export { transformer as default };