1.0.0 • Published 1 year ago
component-modal-custom-ab v1.0.0
��# Modal-Componant
React Modal Component for HRnet - HealthWealth
Install Component
npm i component-modal-custom-ab
How use it !
The Modal use props :
- {props.title} : string
- {props.message} : string
- {props.image} : string
- {props.imageContent} : string
- {closeModal} : function
Example to use :
import Modal from "./lib";
import approval from "./assets/approval.png";
function closeModal() {
alert("Close button clicked");
// Set to close the modal with a useState ?
}
function App() {
return (
<Modal
title="Successfull"
message="A new employee has been created to the list."
image={approval}
imageContent="Woman with a valid element"
closeModal={closeModal}
/>
);
}
export default App;
1.0.0
1 year ago