A customizable modal component for React by jcl.
npm install jcl-custom-modaljcl-custom-modal is a customizable modal component for React applications. This package allows developers to easily add modals to their projects and customize the content and appearance of the modal.
bashnpm install jcl-custom-modal
or
bashyarn add jcl-custom-modal
`` js
import React, { useState } from 'react';
import JclModal from 'jcl-custom-modal'; // Import the modal component
import 'jcl-custom-modal/dist/JclModal.css'; // Import the CSS styles
const App = () => {
const [isOpen, setIsOpen] = useState(false);
return (
This is an example of using JclModal.
export default App;
`
(boolean): Controls whether the modal is visible.
- onRequestClose (function): A callback function that triggers when the modal is closed.
- className (string): Additional class names for custom styling.Props
To customize the appearance of the modal, you can override the default CSS styles. Below are the class names available for customization:
-
.modal-overlay: The background overlay.
- .modal-content: The container for the modal content.
- .close-button`: The close button.