Nineties Party Mix

    @hsl-fi/modal

    0.3.1 • 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>
    

    Keywords

    none

    Install

    npm i @hsl-fi/modal

    DownloadsWeekly Downloads

    92

    Version

    0.3.1

    License

    none

    Unpacked Size

    87.7 kB

    Total Files

    4

    Last publish

    Collaborators

    • vmhonkala
    • ollinieminen
    • tafe-solita
    • tepporuokosalmi
    • venlahytonen