DeleteButton.story.tsx 598 B

123456789101112131415161718192021222324
  1. import React, { FunctionComponent } from 'react';
  2. import { storiesOf } from '@storybook/react';
  3. import { DeleteButton } from './DeleteButton';
  4. const CenteredStory: FunctionComponent<{}> = ({ children }) => {
  5. return (
  6. <div
  7. style={{
  8. height: '100vh ',
  9. display: 'flex',
  10. alignItems: 'center',
  11. justifyContent: 'center',
  12. }}
  13. >
  14. {children}
  15. </div>
  16. );
  17. };
  18. storiesOf('UI/DeleteButton', module)
  19. .addDecorator(story => <CenteredStory>{story()}</CenteredStory>)
  20. .add('default', () => {
  21. return <DeleteButton onConfirm={() => {}} />;
  22. });