UNPKG

@chamn/engine

Version:
41 lines (40 loc) 1.25 kB
import { InputProps } from 'antd'; import { MouseEventHandler } from 'react'; type CumulativeInfoType = { x: number; y: number; cumulativeX: number; cumulativeY: number; }; export declare const useDragSize: (options?: { onStart?: (data: CumulativeInfoType) => void; onChange?: (data: CumulativeInfoType) => void; onEnd?: (data: CumulativeInfoType) => void; limitCumulative?: { x?: [number | undefined, number | undefined]; y?: [number | undefined, number | undefined]; }; }) => { onMouseDown: MouseEventHandler<any>; }; type MinMaxType = { px?: number; vw?: number; vh?: number; rem?: number; }; export type CSSSizeInputProps = { value?: string; onValueChange?: (newVal: string | undefined) => void; min?: MinMaxType | number; max?: MinMaxType | number; size?: InputProps['size']; style?: React.CSSProperties; className?: string; unit?: boolean; /** 累计的偏移量,映射为具体的值,默认 1:1 */ cumulativeTransform?: (params: CumulativeInfoType) => CumulativeInfoType; unitList?: (keyof MinMaxType)[]; }; export declare const CSSSizeInput: (props: CSSSizeInputProps) => import("react/jsx-runtime").JSX.Element; export {};