diff options
author | Aylur <[email protected]> | 2024-06-04 23:05:41 +0200 |
---|---|---|
committer | Aylur <[email protected]> | 2024-06-04 23:05:41 +0200 |
commit | ca74fb7ad016f9ceee3756a973baa2d87a8aa1d6 (patch) | |
tree | d935caa5959c1344ce9e99ae3ca9be699426ad2a /gjs/src/jsx/jsx-runtime.ts | |
parent | cfe3244e61207d4d761f2522546cb2bfb1c539f3 (diff) |
small fixes
* export Gdk
* flatten jsx children
Diffstat (limited to 'gjs/src/jsx/jsx-runtime.ts')
-rw-r--r-- | gjs/src/jsx/jsx-runtime.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gjs/src/jsx/jsx-runtime.ts b/gjs/src/jsx/jsx-runtime.ts index 3d9cc49..7a90dc5 100644 --- a/gjs/src/jsx/jsx-runtime.ts +++ b/gjs/src/jsx/jsx-runtime.ts @@ -17,6 +17,8 @@ export function jsx( if (!Array.isArray(children)) children = [children] + else + children = children.flat() if (ctor === "centerbox") { if (children[0]) @@ -27,11 +29,6 @@ export function jsx( props.endWidget = w(children[2]) } - else if (ctor === "label" && children[0]) { - props.label = children[0] - delete props.children - } - else if (children.length === 1) { props.child = w(children[0]) delete props.children |