react-selectable-box
Version:
A React component used hooks that allows you to select elements in the drag area using the mouse
17 lines (16 loc) • 484 B
TypeScript
import { Rule } from './context';
export declare const getClientXY: (e: MouseEvent | TouchEvent) => {
clientX: number;
clientY: number;
};
export declare const checkInRange: (rule: Rule, rect: {
left: number;
top: number;
width: number;
height: number;
} | undefined, scrollContainer: HTMLElement | null, boxRect: {
top: number;
left: number;
width: number;
height: number;
}, boxRef: React.MutableRefObject<HTMLDivElement | null>) => boolean;