UNPKG

goobs-frontend

Version:

A comprehensive React-based libary for building modern web applications

36 lines 1.52 kB
import { default as React } from 'react'; import { FieldStyleOverrides } from '../Shell'; export interface SignatureFieldProps { /** The signature as a PNG data-URL, or '' when empty. */ value?: string; /** Called with the new data-URL on each stroke end, or '' on clear. */ onChange?: (value: string) => void; /** Called (touched) when the surface loses focus / a stroke ends. */ onBlur?: () => void; label?: React.ReactNode; helperText?: string; /** Error message rendered below the surface; sets aria-invalid. */ error?: string | boolean; required?: boolean; disabled?: boolean; placeholder?: string; /** Drawing-stroke color. Default '#111111'. */ penColor?: string; /** Canvas background (also the exported PNG background). Default '#ffffff'. */ backgroundColor?: string; /** Text shown on the clear button. Default 'Clear'. */ clearText?: string; /** Stable test selector — emitted as `data-field` on the wrapper. */ dataField?: string; /** Stable test selector — emitted as `data-field-name` on the wrapper. */ dataFieldName?: string; /** Form-engine binding key (also `data-field-name` when dataFieldName unset). */ name?: string; styles?: FieldStyleOverrides & { /** Pixel height of the drawing surface (default 180). */ height?: number | string; }; } declare const SignatureField: React.FC<SignatureFieldProps>; export default SignatureField; //# sourceMappingURL=index.d.ts.map