Skip to content

Commit 49c6d36

Browse files
authored
type declaration - fix missing children prop (#819)
* fix missing `children` prop React 18's types are more strict and the missing `children` prop results in this typescript error being thrown when using the component ``` Type '{ children: Element[]; css: SerializedStyles; split: "vertical"; minSize: number; maxSize: number; onDragStarted: () => void; onDragFinished: (newSize: number) => void; size: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & { css?: Interpolation<Theme>; } & Pick<...> & InexactPartial<...> & InexactPartial<...>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SplitPane> & { css?: Interpolation<Theme>; } & Pick<...> & InexactPartial<...> & InexactPartial<...>'.ts(2322) ``` * make children prop optional
1 parent 95f8c65 commit 49c6d36

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type SplitPaneProps = {
2525
pane2Style?: React.CSSProperties;
2626
resizerClassName?: string;
2727
step?: number;
28+
children?: React.ReactNode;
2829
};
2930

3031
export type SplitPaneState = {

0 commit comments

Comments
 (0)