react-touch-modal
v1.0.10
Published
react-touch-modal
Downloads
31
Readme
Getting Started
You can install the module via npm
or yarn
:
npm install react-touch-modal --save
Description
touch drawer
Basic Usage
import React from "react";
import Drawer from "react-touch-modal";
const Example = () => {
const [isVisible, setIsVisible] = useState(false);
return (
<Drawer direction={"right"} visible={isVisible} onToggle={() => setIsVisible(prev=>!prev)}>
TEST
</Drawer>,
)
}
Props
| Prop | Type | Required? | Default Value | Description |
| -------------- | ---------- | --------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| visible | boolean
| Required | - | 사용여부 |
| onToggle | function
| Required | - | toggle function |
| direction | left or right or top or bottom
| Required | - | drawer 나오는 방향 |
| full | boolean
| Optional | false
| modal full screen |
| isTouch | boolean
| Optional | true
| touch 여부 |
License
MIT