@lampn9397/react-textbook-questions
v1.0.3
Published
[![NPM version](https://img.shields.io/npm/v/@lampn9397/react-textbook-questions)](https://www.npmjs.com/package/@lampn9397/react-textbook-questions) [![License](https://img.shields.io/npm/l/@lampn9397/react-textbook-questions)](https://github.com/lampn93
Downloads
1
Readme
@lampn9397/react-textbook-questions
Installation
yarn add @lampn9397/react-textbook-questions
Or
npm install @lampn9397/react-textbook-questions
Usage
import { DraggableItem, DroppableZone } from "@lampn9397/react-textbook-questions";
<DraggableItem
// Item data
item={{}}
// DroppableZone rect
droppableZone={{
x: 0,
y: 0,
width: 0,
height: 0,
}}
onDragStop={({ isInDroppableZone }) => { }}
/>
// Ref for calculate DroppableZone rect
const droppableZoneRef = React.useRef();
// For calculate DroppableItem in zone
const badgeNumber = 0;
<DroppableZone ref={droppableZoneRef} badgeNumber={badgeNumber} />
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT