split-pane-react-test
Version:
Resizable split panes for React.js.
39 lines (38 loc) • 1.01 kB
TypeScript
import React from 'react';
interface HTMLElementProps {
title?: string;
style?: React.CSSProperties;
className?: string;
role?: string;
}
export interface ISplitProps extends HTMLElementProps {
children: JSX.Element[];
/**
* Should allowed to resized
*
* default is true
*/
allowResize?: boolean;
/**
* How to split the space
*
* default is vertical
*/
split?: 'vertical' | 'horizontal';
/**
* Only support controlled mode, so it's required
*/
sizes: (string | number)[];
onChange: (sizes: number[]) => void;
className?: string;
sashClassName?: string;
paneClassName?: string;
/**
* Specify the size fo resizer
*
* defualt size is 4px
*/
resizerSize?: number;
}
declare const SplitPane: ({ children, sizes: propSizes, allowResize, split, className, sashClassName, paneClassName, resizerSize, onChange, ...others }: ISplitProps) => JSX.Element;
export default SplitPane;