@@ -2,9 +2,9 @@ import * as React from 'react';
22
33export type Size = string | number ;
44
5- type Partial < T > = { [ P in keyof T ] ?: T [ P ] } ;
5+ export type Split = 'vertical' | 'horizontal' ;
66
7- export interface Props {
7+ export type SplitPaneProps = {
88 allowResize ?: boolean ;
99 className ?: string ;
1010 primary ?: 'first' | 'second' ;
@@ -25,14 +25,17 @@ export interface Props {
2525 pane2Style ?: React . CSSProperties ;
2626 resizerClassName ?: string ;
2727 step ?: number ;
28- }
28+ } ;
2929
30- export interface State {
30+ export type SplitPaneState = {
3131 active : boolean ;
3232 resized : boolean ;
33- }
33+ } ;
3434
35- declare class SplitPane extends React . Component < Props , State > {
35+ declare class SplitPane extends React . Component <
36+ SplitPaneProps ,
37+ SplitPaneState
38+ > {
3639 constructor ( ) ;
3740
3841 onMouseDown ( event : MouseEvent ) : void ;
@@ -45,9 +48,24 @@ declare class SplitPane extends React.Component<Props, State> {
4548
4649 onMouseUp ( ) : void ;
4750
48- static getSizeUpdate ( props : Props , state : State ) : Partial < State > ;
51+ static getSizeUpdate (
52+ props : SplitPaneProps ,
53+ state : SplitPaneState
54+ ) : Partial < SplitPaneState > ;
4955
50- static defaultProps : Props ;
56+ static defaultProps : SplitPaneProps ;
5157}
5258
5359export default SplitPane ;
60+
61+ export type PaneProps = {
62+ className ?: string ;
63+ size ?: Size ;
64+ split ?: Split ;
65+ style ?: React . CSSProperties ;
66+ eleRef ?: ( el : HTMLDivElement ) => void ;
67+ } ;
68+
69+ declare class Pane extends React . PureComponent < PaneProps > { }
70+
71+ export { Pane } ;
0 commit comments