confirmDelete.stories.js 745 B

1234567891011121314151617181920212223242526272829
  1. import React from 'react';
  2. import {withInfo} from '@storybook/addon-info';
  3. import {action} from '@storybook/addon-actions';
  4. import ConfirmDelete from 'app/components/confirmDelete';
  5. import Button from 'app/components/button';
  6. export default {
  7. title: 'UI/Confirm',
  8. };
  9. export const _ConfirmDelete = withInfo({
  10. text: 'A Confirm Modal that requires a user to enter a confirmation string.',
  11. propTablesExclude: [Button],
  12. })(() => (
  13. <div>
  14. <ConfirmDelete
  15. onConfirm={action('confirmed')}
  16. confirmInput="Type this out"
  17. message="Are you sure you want to do this?"
  18. >
  19. <Button priority="primary">Confirm on Button click</Button>
  20. </ConfirmDelete>
  21. </div>
  22. ));
  23. _ConfirmDelete.story = {
  24. name: 'ConfirmDelete',
  25. };