@hsl-fi/modal
0.3.2 • Public • Published Modal
import Modal from '@hsl-fi/modal';
const [isModalOpen, setIsModalOpen] = useState(false);
const handleModalCrossClick = () => setIsModalOpen(false);
<Modal
appElement="#__next"
contentLabel="Content label"
closeButtonLabel="Close"
isOpen={isModalOpen}
onCrossClick={handleModalCrossClick}
// variant?: "large", "small" or "confirmation"
// shouldCloseOnEsc?: boolean;
// shouldCloseOnOverlayClick?: boolean;
// onOpen?: () => void;
// onClose?: () => void;
>
<ChildComponent />
</Modal>
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads