React modal component
npm install @fster/react-modalnode >= 14 and npm >= 5.6.``shell`
npm i @fster/react-modal@latest
as peer dependencies.How to use ?
Props title and text are necessary.
Use ìsVisible boolean props to render the modal.
The default target is document.body. - Props type
`ts
export interface ModalProps {
title: string;
text: string;
isVisible: Boolean;
target: Element | DocumentFragment;
}
`- Example
`jsx
import { Modal } from '@fster/react-modal'function App () {
return (
title= 'Your Title'
text= 'Your content text'
isVisible= {true}
target= {document.body}
/>
);
}export default App;
``