@@ -54,11 +54,9 @@ export const splitViewImpl = React.forwardRef((props, ref) => {
5454 style: [{ flexDirection: "row" }, style],
5555 ...rest,
5656 },
57− React.createElement(
58− View,
59− { style: { width: sidebarWidth, overflow: "hidden" } },
60− leftChild
61− ),
57+ leftChild && React.cloneElement(leftChild, {
58+ style: [leftChild.props.style, { width: sidebarWidth, overflow: "hidden" }],
59+ }),
6260 React.createElement(View, {
6361 ...panRef.current.panHandlers,
6462 onMouseEnter: () => setHovered(true),
@@ -79,10 +77,8 @@ export const splitViewImpl = React.forwardRef((props, ref) => {
7977 pointerEvents: "none",
8078 })
8179 ),
82− React.createElement(
83− View,
84− { style: { flex: 1, overflow: "hidden" } },
85− rightChild
86− )
80+ rightChild && React.cloneElement(rightChild, {
81+ style: [rightChild.props.style, { flex: 1, overflow: "hidden" }],
82+ })
8783 );
8884});