hrnet-modal-aplainea

1.0.5 • Public • Published

HRNet Modal

Install

npm i hrnet-modal-aplainea

Usage

import { Modal } from "hrnet-modal-aplainea";

function MyModal() {
    const [modalVisible, setModalVisible] = useState(false);

    const openModal = () => {
        setModalVisible(true);
    };

    const closeModal = () => {
        setModalVisible(false);
    };
    return (
        <div>
            <button onClick={openModal}>Click to open modal</button>
            <Modal
                show={modalVisible}
                close={closeModal}
                title="My Modal"
                mainContent={<p>Main content!</p>}
                footerContent={
                    <div className="modal-footer-actions">
                        <button
                            onClick={() => {
                                closeModal();
                            }}
                        >
                            Close
                        </button>
                    </div>
                }
            />
        </div>
    );
}

Readme

Keywords

none

Package Sidebar

Install

npm i hrnet-modal-aplainea

Weekly Downloads

1

Version

1.0.5

License

none

Unpacked Size

22.3 kB

Total Files

7

Last publish

Collaborators

  • aplainea