-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22b216f
commit 89beb91
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# rmodal-component | ||
|
||
<p>✔️ In desktop devices in modal and in mobile device is draggable drawer.</p> | ||
<p>✔️ In mobile device can close modal with dragging like instagram modals.</p> | ||
<p>✔️ Lock Body scroll when modal opened.</p> | ||
|
||
|
||
|
||
[![NPM](https://img.shields.io/npm/v/rmodal-component.svg)](https://www.npmjs.com/package/rmodal-component) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) | ||
|
||
## Full Document | ||
- [Document](https://mostafarostami72.github.io/rmodal-component/) | ||
## Demo | ||
- [Demo](https://mostafarostami72.github.io/rmodal-component/) | ||
|
||
## Install | ||
|
||
```bash | ||
npm install --save rmodal-component | ||
``` | ||
|
||
## Usage | ||
|
||
```jsx | ||
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](https://github.com/MostafaRostami72) |