using yarn : yarn add modal-sheet
using npm : npm i modal-sheet
import Modal from 'modal-sheet';
const ref = useRef(null)
const onOpen = () => ref.current.open()
const onClose = () => ref.current.close()
// ...
<Modal ref={ref} size="m">
{children}
</Modal>
// ...| Props | Require | Description |
|---|---|---|
| size | no | "s", "m" ,"l" , "xl" |
Open Modal
Close Modal