1.0.10 • Published 6 years ago
react-draggable-layer v1.0.10

基于 TypeScript + React Hooks 开发的可拖拽弹层
Example
# install project packages
npm install
# install example packages
cd examples
npm install
# run start
npm run startInstallation
npm install --save @emotion/core react-draggable-layeror
yarn add @emotion/core react-draggable-layerUsage
import DraggableLayer from "react-draggable-layer";
const App = () => <DraggableLayer />;API
| name | description | type |
|---|---|---|
| children | custom draggable layer content | ReactNode |
| titleName | The draggable layer's title | string |
| visible | Whether the draggable layer is visible or not | boolean |
| onClose | Specify a function that will be called when a user clicks close button | function |
License
MIT, see the LICENSE file for detail.