react-native-signature-touch
Version:
A lightweight signature capture library for React Native apps
34 lines • 947 B
TypeScript
export type SignatureRef = {
clear: () => void;
undo: () => void;
redo: () => void;
isEmpty: () => boolean;
getSvg: () => {
svg: string;
width: number;
height: number;
};
getImage: (opts?: {
mimeType?: 'image/png' | 'image/jpeg';
quality?: number;
scale?: number;
}) => Promise<string>;
};
export type SignatureProps = {
strokeColor?: string;
strokeWidth?: number;
backgroundColor?: string;
minDistance?: number;
onBegin?: () => void;
onEnd?: (paths: string[]) => void;
onChange?: (hasStrokes: boolean) => void;
style?: any;
};
type Point = {
x: number;
y: number;
};
export declare function pointsToPath(points: readonly Point[]): string;
export declare const Signature: import("react").ForwardRefExoticComponent<SignatureProps & import("react").RefAttributes<SignatureRef>>;
export {};
//# sourceMappingURL=Signature.d.ts.map