index.tsx 810 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React from 'react';
  2. import Dialog from '../Dialog';
  3. import Button from '../Button';
  4. import {
  5. TextWrapper, BtnWrapper,
  6. } from './styled';
  7. type Props = {
  8. open: boolean;
  9. onCancel: (e: any) => void;
  10. onDelete: (e: any) => void;
  11. };
  12. const index: React.FunctionComponent<Props> = ({
  13. open,
  14. onCancel,
  15. onDelete,
  16. }: Props) => (
  17. <Dialog open={open}>
  18. <TextWrapper>
  19. This will permanently delete the annotation. Do you want to continue?
  20. </TextWrapper>
  21. <BtnWrapper>
  22. <Button
  23. appearance="default-hollow"
  24. onClick={onCancel}
  25. >
  26. Cancel
  27. </Button>
  28. <Button
  29. appearance="primary"
  30. onClick={onDelete}
  31. style={{ marginLeft: '16px' }}
  32. >
  33. OK
  34. </Button>
  35. </BtnWrapper>
  36. </Dialog>
  37. );
  38. export default index;