diff --git a/src/components/modal/index.tsx b/src/components/modal/index.tsx index 64efc37..58ba77b 100644 --- a/src/components/modal/index.tsx +++ b/src/components/modal/index.tsx @@ -16,6 +16,7 @@ interface ModalProps { } actionComponent?: React.ReactNode children: React.ReactNode + closeOnEscape?: boolean } const Container = styled.div` @@ -87,40 +88,42 @@ const CancelText = styled(Text)` cursor: pointer; ` -const Modal = forwardRef(({ isOpen, noOverlay, header, actionComponent, onClose, children }, ref) => { - useKeyDown({ key: 'Escape', active: isOpen }, () => onClose()) - - const Transition = useTransition({ - container: Container, - animateIn: slide.in['center'], - animateOut: slide.out['center'], - }) - - if (!isOpen) return null - - return ReactDOM.createPortal( - <> -