@onesy/ui-react
Version:
UI for React
49 lines (48 loc) • 1.64 kB
TypeScript
import React from 'react';
import { ISurface } from '../Surface/Surface';
import { IElement, IElementReference, IPropsAny, IRef } from '../types';
export declare type TDrawingValue = Array<{
d?: string;
stroke?: string;
strokeWidth?: number;
}>;
export declare type IDrawing = Omit<ISurface, 'onChange' | 'onMouseDown'> & {
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;