UNPKG

@uiw/react-signature

Version:

A signature board component for react.

22 lines (21 loc) 764 B
import React from 'react'; import { type StrokeOptions } from 'perfect-freehand'; import { type Dispatch } from '../store'; export * from 'perfect-freehand'; export * from '../utils'; export * from '../options'; export * from '../store'; export type SignatureCanvasRef = { canvas: HTMLCanvasElement | null; dispatch: Dispatch; clear: () => void; }; export interface SignatureProps extends React.CanvasHTMLAttributes<HTMLCanvasElement> { prefixCls?: string; options?: StrokeOptions; readonly?: boolean; defaultPoints?: Record<string, number[][]>; onPointer?: (points: number[][]) => void; } declare const Signature: React.ForwardRefExoticComponent<SignatureProps & React.RefAttributes<SignatureCanvasRef>>; export default Signature;