modal-react-sow
v1.2.2
Published
Made with create-react-library
Downloads
9
Readme
modal-react-sow
Made with create-react-library
Install
npm install --save modal-react-sow or yarn add modal-react-sowUsage
import React from 'react'
//import Modal and useModal ffrom modal-react-sow
import { Modal, useModal } from 'modal-react-sow'
const App = () => {
// use Modal hook to use
const { isOpen, toggle } = useModal()
return (
<section className='main'>
<h1>
{' '}
Your Main content <br /> May be a form or text content
</h1>
{/*your own button, you just add the toggle function in your button*/}
<button
className='open'
onClick={() => {
toggle()
}}
>
Ouvrir Modal
</button>
<Modal isOpen={isOpen} toggle={toggle} modalMessage='Employee Created' />
</section>
)
}
export default AppCustom modal in the component Modal
1 - custom modal message by the prop modalMessage
2 - custom modal Background color by the prop modalBgColor
3 - custom modal icon by the prop iconClassName
4 - custom modal content Background color by the prop modalContentBgColor'
5 - custom modal color text the prop color '
License
MIT © [Bailo sow ]
