1.0.10 • Published 2 years ago
react-touch-modal v1.0.10
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