UNPKG

swipe-button

Version:

A lightweight, unstyled, and fully accessible swipe-to-action button for React. Built with zero dependencies.

19 lines (16 loc) 802 B
import * as react from 'react'; import { HTMLAttributes } from 'react'; interface SwipeButtonRootProps extends HTMLAttributes<HTMLDivElement> { onSuccess: () => void; onFail?: () => void; disabled?: boolean; reverseSwipe?: boolean; delta?: number; } declare const SwipeButton: { Root: react.ForwardRefExoticComponent<SwipeButtonRootProps & react.RefAttributes<HTMLDivElement>>; Rail: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>; Overlay: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>; Slider: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>; }; export { SwipeButton, type SwipeButtonRootProps };