0.1.98 • Published 3 years ago
plugin-modal-ligank v0.1.98
Plugin-modal-ligank library of React components created using create-react-app
.
A plugin to automate the creation of a modal that can be used as validation or form with many parameters, they are not all required.
Documentation
Parameters :
show : always a state equal to false by default.
title: Title of the modal (like 'Login' before input).
titleColor: Color of the title.
modalColor: Color of background.
modalText: Text of the modal (like 'Confirmed !').
modalTextColor: Color of text.
closeColor: Color of the close circle.
closeColorX: Color of the X close.
borderColor: Color of the border of the modal.
inputName1: Name of first input.
inputName2: Name of second input.
inputButtonText: Text of the button of the form.
handleClick: Action to do when form is send.
closeAction: Action to do when modal is closed.
Installation
Install plugin-modal-ligank with npm
npm i plugin-modal-ligank
How to use
import {Modal} from "plugin-modal-ligank"
const [isShown, setIsShown] = useState(false);
useEffect(()=>{
setIsShown(false)
}, [isShown])
function handleClick() {
//what you want
setIsShown(true)
}
<div>
<form action="#">
<button onClick={handleClick}>Confirm</button>
<Modal buttonText="" modalText="" show={isShown}/>
</form>
</div>
You can pass a function in handleClickInput if there are inputs.
Authors
0.1.96
3 years ago
0.1.97
3 years ago
0.1.75
3 years ago
0.1.98
3 years ago
0.1.91
3 years ago
0.1.92
3 years ago
0.1.81
3 years ago
0.1.93
3 years ago
0.1.94
3 years ago
0.1.95
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.9
3 years ago
0.1.4
3 years ago
0.1.6
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago