Skip to content

MostafaRostami72/rmodal-component

Repository files navigation

rmodal-component

✔️ In desktop devices in modal and in mobile device is draggable drawer.

✔️ In mobile device can close modal with dragging like instagram modals.

✔️ Lock Body scroll when modal opened.

NPM JavaScript Style Guide

Full Document

Demo

Install

npm install --save rmodal-component

Usage

import React, {useState} from 'react';
import Modal from 'rmodal-component';
import 'rmodal-component/dist/index.css'

const Example = () => {
    const [show, setShow] = useState(false);
    
    return (
        <div>
            <Modal show={show} onClose={() => setShow(false)} smModal={true} lockBodyScroll={true} modalTitle={"modal Title"}>
                ...
            </Modal>
        </div>
    );
};

export default Example;

License

MIT © MostafaRostami72