1.2.3 • Published 3 years ago
kj-modal-component v1.2.3
kj-modal-component
A simple component to display a modal, styled with Bootstrap. Nothing fancy.
Installation
Just run npm install kj-modal-component
and you're all set.
Usage
- Import
import { Modal, useModal } from "kj-modal-component"
- Initiate the modal state
const { isShowing, toggle } = useModal()
- Insert the component where you want in your JSX code
<Modal header="Information header" msg="Message you want to display" isShowing={isShowing} hide={toggle} />