1.0.1 • Published 2 years ago
modal-component-oc-hk-1 v1.0.1
modal-component-oc-hk-1
This component must work with a react project such as Create React App.
Installation
In the project directory, you can run:
npm i modal-component-oc-hk-1
or
yarn add modal-component-oc-hk-1
Usage
- First import the Modal
import { Modal } from "modal-component-oc-hk-1/dist/index"
- In the same file, add then the function that toggles the modal
import { toggleModal } from 'modal-component-oc-hk-1/dist/components/Modal'
- Add the modal component where desired and use the
message
prop to change the modal message if you so wish
For example :
export default function AppTest () {
return (
<Modal
message={'Hello!'}
>
)
}