From ca74fb7ad016f9ceee3756a973baa2d87a8aa1d6 Mon Sep 17 00:00:00 2001 From: Aylur Date: Tue, 4 Jun 2024 23:05:41 +0200 Subject: small fixes * export Gdk * flatten jsx children --- gjs/src/jsx/jsx-runtime.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gjs/src/jsx/jsx-runtime.ts') 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 -- cgit v1.2.3