npm.io
1.1.3 • Published 2 years ago

@types/react-longpressable

Licence
MIT
Version
1.1.3
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-longpressable

Summary

This package contains type definitions for react-longpressable (https://github.com/stardust66/react-longpressable#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-longpressable.

index.d.ts

import * as React from "react";

export interface LongPressProps {
    onLongPress: (e: React.SyntheticEvent) => void;
    onShortPress?: (e: React.SyntheticEvent) => void;

    /**
     * @default 500ms
     */
    longPressTime?: number;

    /**
     * @default true
     */
    primaryMouseButtonOnly?: boolean;

    /**
     * @default 100ms
     */
    dragThreshold?: number;

    children?: React.ReactNode;
}

export default class LongPress extends React.PureComponent<LongPressProps> {}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: @types/react

Credits

These definitions were written by VingeRay.