UNPKG

@amaui/ui-react

Version:
49 lines (48 loc) 1.6 kB
import React from 'react'; import { ISurface } from '../Surface/Surface'; import { IElement, IElementReference, IPropsAny, IRef } from '../types'; export type TDrawingValue = Array<{ d?: string; stroke?: string; strokeWidth?: number; }>; export interface IDrawing extends ISurface { render?: (element: string, props: IPropsAny, value: TDrawingValue) => IElement; svgRef?: IRef; updates?: boolean; actions?: boolean; exclude?: Array<string>; downloadName?: string; downloadType?: string; downloadQuality?: number; viewBox?: string; strokeColor?: string; strokeWidth?: number; valueDefault?: TDrawingValue; value?: TDrawingValue; onChange?: (value: TDrawingValue) => any; onMouseDown?: (event: React.MouseEvent<any>) => any; onClear?: (event?: React.MouseEvent<any>) => any; onDownload?: (event?: React.MouseEvent<any>) => any; IconClear?: IElementReference; IconDownload?: IElementReference; IconSize?: IElementReference; IconStrokeColor?: IElementReference; IconProps?: IPropsAny; SizeProps?: IPropsAny; AppendProps?: IPropsAny; ToolbarProps?: IPropsAny; ToolbarUpdatesProps?: IPropsAny; ToolbarActionsProps?: IPropsAny; ToggleButtonProps?: IPropsAny; ToggleButtonsProps?: IPropsAny; DividerProps?: IPropsAny; SelectProps?: IPropsAny; ListItemProps?: IPropsAny; TooltipProps?: IPropsAny; PaletteProps?: IPropsAny; IconButtonProps?: IPropsAny; ColorTextFieldProps?: IPropsAny; } declare const Drawing: React.FC<IDrawing>; export default Drawing;