1.0.4 • Published 11 months ago
oc-modal-p14 v1.0.4
Modal Component
A customizable Modal component for React.
Installation
You can install the package using npm:
npm install oc-modal-p14
Import the Counter component:
import {Modal} from "oc-modal-p14/src/Modal/Modal.tsx";
Modal Props
Prop | Type | Description |
---|---|---|
text | string | The message to display in the modal. |
showModal | boolean | Controls the visibility of the modal. |
error | boolean | Indicates if the modal should display an error style. |
Usage
Exemple 1 : Modal with sucess style
<Modal text="Employé créé avec succès !" showModal={true} error={false} />
Exemple 2 : Modal with error style
<Modal text="Veuillez remplir tous les champs !" showModal={true} error={true} />
Exemple 2 : Modal with default style (remove error prop)
<Modal text="Veuillez remplir tous les champs !" showModal={true} />