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
|
Rev | Line | |
---|
[d565449] | 1 | import { FC } from 'react';
|
---|
| 2 | export interface ScratchSensorParams {
|
---|
| 3 | disabled?: boolean;
|
---|
| 4 | onScratch?: (state: ScratchSensorState) => void;
|
---|
| 5 | onScratchStart?: (state: ScratchSensorState) => void;
|
---|
| 6 | onScratchEnd?: (state: ScratchSensorState) => void;
|
---|
| 7 | }
|
---|
| 8 | export 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 | }
|
---|
| 25 | declare const useScratch: (params?: ScratchSensorParams) => [(el: HTMLElement | null) => void, ScratchSensorState];
|
---|
| 26 | export interface ScratchSensorProps extends ScratchSensorParams {
|
---|
| 27 | children: (state: ScratchSensorState, ref: (el: HTMLElement | null) => void) => React.ReactElement<any>;
|
---|
| 28 | }
|
---|
| 29 | export declare const ScratchSensor: FC<ScratchSensorProps>;
|
---|
| 30 | export default useScratch;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.