https://github.com/cyril-develop/custom-modal-reactjs
https://github.com/cyril-develop/custom-modal-reactjs
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cyril-develop/custom-modal-reactjs
- Owner: Cyril-Develop
- Created: 2024-04-21T08:08:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-11T08:35:14.000Z (about 2 years ago)
- Last Synced: 2025-09-19T00:38:29.279Z (9 months ago)
- Language: TypeScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom Modal
## 🚀 Getting Started
Install This package :
```
npm install reactjs-custom-modal
```

## ✨ Example:
```js
import React, { useState } from 'react';
import { Modal } from "reactjs-custom-modal";
function App() {
const [isModalOpen, setIsModalOpen] = useState(false);
const openModal = () => {
setIsModalOpen(true);
};
const closeModal = () => {
setIsModalOpen(false);
};
return (
Open Modal
);
}
export default App;
```
## 📌 Props
| Prop | Description | Default |
|-------------------|-----------------------------------------------|-------------|
| text | The text that will be displayed in the modal | |
| isOpen | A boolean that will open the modal if true | |
| onClose | The function that will close the modal | |
| textColor | The color of the text in the modal | #fff (white)|
| backgroundColor | The background color of the modal | #157846 (green) |
| iconColor | The color of the icon | red |