source: imaps-frontend/node_modules/react-use/lib/useScratch.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 959 bytes
Line 
1import { FC } from 'react';
2export interface ScratchSensorParams {
3 disabled?: boolean;
4 onScratch?: (state: ScratchSensorState) => void;
5 onScratchStart?: (state: ScratchSensorState) => void;
6 onScratchEnd?: (state: ScratchSensorState) => void;
7}
8export interface ScratchSensorState {
9 isScratching: boolean;
10 start?: number;
11 end?: number;
12 x?: number;
13 y?: number;
14 dx?: number;
15 dy?: number;
16 docX?: number;
17 docY?: number;
18 posX?: number;
19 posY?: number;
20 elH?: number;
21 elW?: number;
22 elX?: number;
23 elY?: number;
24}
25declare const useScratch: (params?: ScratchSensorParams) => [(el: HTMLElement | null) => void, ScratchSensorState];
26export interface ScratchSensorProps extends ScratchSensorParams {
27 children: (state: ScratchSensorState, ref: (el: HTMLElement | null) => void) => React.ReactElement<any>;
28}
29export declare const ScratchSensor: FC<ScratchSensorProps>;
30export default useScratch;
Note: See TracBrowser for help on using the repository browser.