UNPKG

shineout

Version:

Shein 前端组件库

58 lines (57 loc) 2.62 kB
import React from 'react'; import { ResizableType } from './Props'; interface BaseProps { style?: React.CSSProperties; className?: string; } interface ResizeableState { x: number; y: number; } declare type Direction = 'x' | 'y' | 'xy'; declare const _default: <U extends BaseProps>(Origin: React.ComponentType<U>) => { new (props: ResizableType<U>): { resizableId: string; handlers: Map<HTMLElement, EventListener>; active?: Direction | undefined; appended?: boolean | undefined; size?: { width: number; height: number; } | undefined; el: HTMLElement; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; getStyle(): { width: number; height: number; } | undefined; handleMouseMove(e: MouseEvent): void; handleMouseDown(dir: Direction): void; handleMouseUp(): void; appendHandler(): void; render(): JSX.Element; context: any; setState<K extends keyof ResizeableState>(state: ResizeableState | ((prevState: Readonly<ResizeableState>, props: Readonly<ResizableType<U>>) => ResizeableState | Pick<ResizeableState, K> | null) | Pick<ResizeableState, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<ResizableType<U>> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<ResizeableState>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly<ResizableType<U>>, nextState: Readonly<ResizeableState>, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<ResizableType<U>>, prevState: Readonly<ResizeableState>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<ResizableType<U>>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<ResizableType<U>>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<ResizableType<U>>, nextState: Readonly<ResizeableState>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<ResizableType<U>>, nextState: Readonly<ResizeableState>, nextContext: any): void; }; contextType?: React.Context<any> | undefined; }; export default _default;