1.0.1 • Published 2 months ago

modal-react-gautha v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Modal

This plugin is for the project 14 from OpenClassrooms formation "Front-End".

How to install ?

npm i modal-react-gautha

How to use ?

  1. Import the plugin in your project like this :
import Modal from "modal-react-gautha";
  1. The state :
const [displayModal, setDisplayModal] = useState(false);
  1. In the return :
<Modal key={modalReset} id="You-modal-id" showModal={displayModal} closeModal={() => setDisplayModal(false)} parameter={modalParameter} message="Your message" />

Customize you modal

  1. Put this into your component :
const modalParameter = {
	"backgroundColor": "#EEEEEE",   
	"borderRadius": 10,
	"boxShadow": "0 0 5px #1B1919",
	"color": "#1B1919",
	"fontSize": 18,
	"height": "fit-content",
	"padding": "20px 50px",
	"width": "fit-content"
}
1.0.1

2 months ago