@zhabchyk/modalhrnet
v1.0.5
Published
A modal react component for HRNet project
Downloads
5
Readme
modal
Library to add modal to the HRNet project
Install
npm install --save @zhabchyk/modalhrnet
usage
configuration
const customConfig = {
buttons: [
{
label: 'Home',
className: styles.buttonPurple, // Purple button style from CSS module
action: closeModal // Action to close modal
},
{
label: 'List-employees',
className: styles.buttonGreen,
action: goList
}
],
title: "Confirmation",
onCloseIcon: closeModal
};
Parameters :
- buttons: add button to the end of the modal
- label: label of the button
- className: class of the button
- action: action when button is clicked
- title: title of the modal
- onCloseIcon: action when click to the close icon of the modal
component
<Modal show={isModalVisible} config={customConfig}>
{<h1>Employee Created</h1>
<Callout
title={"Success"}
type={"success"}
>
<p> 💫 Validation: The task of validating the form has been successfully completed.</p>
<p>All required fields have been correctly validated according to the specified criteria.</p>
</Callout>}
</Modal>
License
MIT © tetyanachouteau