This component must work with a react project such as Create React App.
In the project directory, you can run:
npm i modal-component-oc-hk-1
or
yarn add modal-component-oc-hk-1
- 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!'}
>
)
}