UNPKG

@gdn/react-native-simple-canvas

Version:

A simple canvas component for React Native that allows drawing and signature capture.

24 lines 896 B
import React, { MutableRefObject, RefObject } from 'react'; import { ViewStyle } from 'react-native'; import { Svg } from 'react-native-svg'; import { Point } from '../interfaces/Point'; interface SimpleCanvasProps { onDragEvent?: () => void; onCanvasChange?: (isEmpty: boolean) => void; strokeColor?: string; strokeWidth?: number; backgroundColor?: string; style?: ViewStyle; minPoints?: number; } export interface SimpleCanvasRef { resetImage: () => void; getSVG: () => RefObject<Svg>; isEmpty: () => boolean; getPoints: () => Point[]; setPoints: (points: Point[]) => void; } export declare const clearCanvas: (ref: MutableRefObject<SimpleCanvasRef | null>) => void; export declare const SimpleCanvas: React.ForwardRefExoticComponent<SimpleCanvasProps & React.RefAttributes<SimpleCanvasRef>>; export {}; //# sourceMappingURL=SimpleCanvas.d.ts.map