https://github.com/jorisbertier/hrnet-plugin-modal
https://github.com/jorisbertier/hrnet-plugin-modal
plugin react
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jorisbertier/hrnet-plugin-modal
- Owner: jorisbertier
- Created: 2025-04-02T14:40:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-12T18:27:41.000Z (about 1 year ago)
- Last Synced: 2025-10-22T21:44:43.351Z (9 months ago)
- Topics: plugin, react
- Language: JavaScript
- Homepage:
- Size: 154 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hrnet-plugin-modal
React plugin to easily display a Modal with text
# Install Plugin
You can install this plugin via npm
```sh
npm install hrnet-plugin-modal
```
## Prerequisite
- React 17.x ou highter
- Node.js ≥ 18.x
- npm ≥ 7.x
# Modal Component
## Properties
| 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 |
# Use Modal
```jsx
import { Modal } from "hrnet-plugin-modal";
function App() {
const [isOpen, setIsOpen] = useState(false);
return (
setIsOpen(false)}/>
);
}
export default App;
```
# Version
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:
```sh
node -v
```
## Contribute
1. Fork repository
2. `npm install`
3. `npm run dev`
4. Create a branch`feature/nom-fonctionnalité`
5. `npm test` to run the test
6. Open a Pull Request
# License
This component is distributed under MIT license.