confirmDelete.stories.js 782 B

1234567891011121314151617181920212223242526272829303132
  1. import {Button} from 'sentry/components/button';
  2. import ConfirmDelete from 'sentry/components/confirmDelete';
  3. // TODO(scttcper): modal not working
  4. export default {
  5. title: 'Components/Buttons/Confirm',
  6. component: ConfirmDelete,
  7. args: {
  8. confirmInput: 'Type this out',
  9. message: 'Are you sure you want to do this?',
  10. },
  11. argTypes: {
  12. onConfirm: {action: 'confirmed'},
  13. },
  14. };
  15. export const _ConfirmDelete = ({...args}) => (
  16. <div>
  17. <ConfirmDelete {...args}>
  18. <Button priority="primary">Confirm on Button click</Button>
  19. </ConfirmDelete>
  20. </div>
  21. );
  22. _ConfirmDelete.storyName = 'Confirm Delete';
  23. _ConfirmDelete.parameters = {
  24. docs: {
  25. description: {
  26. story: 'A Confirm Modal that requires a user to enter a confirmation string.',
  27. },
  28. },
  29. };