import { CSSProperties, ElementType } from 'react'; import { ColorPropsValue, DivProps, OverridableComponent, OverridableProps, Placement, SlotsAndProps } from '../../types'; import { GestureOptions } from '../../utils'; type HandleAbbr = 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'br' | 'bl' | 'lt' | 'rt' | 'lb' | 'rb'; export type Handle = Placement | HandleAbbr; export interface ResizableOwnProps extends SlotsAndProps<{ container: DivProps; }> { /** 默认为`mouse` */ variant?: 'mouse' | 'touch'; /** 使用的拖拽把手,默认全部生效。注意:使用“角把手”会同时渲染对应的两个“边把手”。 */ handles?: Handle | Handle[]; /** * 拖拽把手的尺寸 * @enum {@link variant}为`mouse`时,默认为`8` * @enum {@link variant}为`touch`时,默认为`12` */ handleSize?: number; /** 拖拽把手颜色,默认为`secondary` */ handleColor?: ColorPropsValue; /** {@link variant}为`touch`时生效,默认为`outside` */ handlePosition?: 'outside' | 'inside'; /** 是否固定长宽比例,默认为`false` */ fixedRatio?: boolean; onResize?(width: number, height: number): void; onResizeEnd?(width: number, height: number): void; gestureOptions?: GestureOptions; /** 受控的尺寸 */ defaultWidth?: CSSProperties['width']; defaultHeight?: CSSProperties['height']; width?: CSSProperties['width']; height?: CSSProperties['height']; /** 设定尺寸限制 */ minWidth?: CSSProperties['minWidth']; minHeight?: CSSProperties['minHeight']; maxWidth?: CSSProperties['maxWidth']; maxHeight?: CSSProperties['maxHeight']; } export type ResizableProps = OverridableProps; export declare const Resizable: OverridableComponent; export {};