UNPKG

@uiw/react-split

Version:

A piece of content can be divided into areas that can be dragged to adjust the width or height.

35 lines (34 loc) 1.25 kB
import React from 'react'; import './style/index.less'; export interface SplitProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onDragEnd'> { style?: React.CSSProperties; className?: string; prefixCls?: string; /** * Drag width/height change callback function, * the width or height is determined according to the mode parameter */ onDragging?: (preSize: number, nextSize: number, paneNumber: number) => void; /** Callback function for dragging end */ onDragEnd?: (preSize: number, nextSize: number, paneNumber: number) => void; /** Support custom drag and drop toolbar */ renderBar?: (props: React.HTMLAttributes<HTMLDivElement>) => React.ReactElement; /** Set the drag and drop toolbar as a line style. */ lineBar?: boolean; /** Set the dragged toolbar, whether it is visible or not */ visible?: boolean | number[]; /** * @deprecated Use `visible` instead */ visiable?: boolean | number[]; /** * Set the drag and drop toolbar, disable */ disable?: boolean | number[]; /** * type, optional `horizontal` or `vertical` */ mode?: 'horizontal' | 'vertical'; } declare const Split: React.FC<SplitProps>; export default Split;