git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on main help sign in
Thin native-looking divider: 1px line with 9px hit area
286e192Mark
src/Yoga/React/Native/MacOS/SplitView.js+6−10
@@ -54,11 +54,9 @@ export const splitViewImpl = React.forwardRef((props, ref) => {
54 style: [{ flexDirection: "row" }, style],
54 style: [{ flexDirection: "row" }, style],
55 ...rest,
55 ...rest,
56 },
56 },
57− React.createElement(
57+ leftChild && React.cloneElement(leftChild, {
58− View,
59− { style: { width: sidebarWidth, overflow: "hidden" } },
58+ style: [leftChild.props.style, { width: sidebarWidth, overflow: "hidden" }],
60− leftChild
61− ),
59+ }),
62 React.createElement(View, {
60 React.createElement(View, {
63 ...panRef.current.panHandlers,
61 ...panRef.current.panHandlers,
64 onMouseEnter: () => setHovered(true),
62 onMouseEnter: () => setHovered(true),
@@ -79,10 +77,8 @@ export const splitViewImpl = React.forwardRef((props, ref) => {
79 pointerEvents: "none",
77 pointerEvents: "none",
80 })
78 })
81 ),
79 ),
82− React.createElement(
80+ rightChild && React.cloneElement(rightChild, {
83− View,
84− { style: { flex: 1, overflow: "hidden" } },
81+ style: [rightChild.props.style, { flex: 1, overflow: "hidden" }],
85− rightChild
86− )
82+ })
87 );
83 );
88});
84});