React plugin to easily display a Modal with text
You can install this plugin via npm
npm install hrnet-plugin-modal
- React 17.x ou highter
- Node.js ≥ 18.x
- npm ≥ 7.x
Prop | Type | Description |
---|---|---|
text |
String | Display the title into the modal |
onClose |
Function | Callback executed when the modal is closed |
isOpen |
Boolean | Control display of the modal |
import { Modal } from "hrnet-plugin-modal";
function App() {
const [isOpen, setIsOpen] = useState(false);
return (
<div>
<Modal isOpen={isOpen} text={'This is a text dialog'} closeModal={() => setIsOpen(false)}/>
</div>
);
}
export default App;
To run this project, we recommend using Node.js version 18.x.x or higher.
You can check your current Node.js version by running:
node -v
- Fork repository
npm install
npm run dev
- Create a branch
feature/nom-fonctionnalité
-
npm test
to run the test - Open a Pull Request
This component is distributed under MIT license.