From 69312f5133734237edaea6ca29e2de9bf3203050 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 15 Jun 2025 01:44:45 +0700 Subject: checkpoint here... --- bs5/universal/native/shared/Stack.re | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bs5/universal/native/shared/Stack.re (limited to 'bs5/universal/native/shared/Stack.re') diff --git a/bs5/universal/native/shared/Stack.re b/bs5/universal/native/shared/Stack.re new file mode 100644 index 0000000..afb8e98 --- /dev/null +++ b/bs5/universal/native/shared/Stack.re @@ -0,0 +1,25 @@ +[@react.component] +let make = + (~gap=0, ~align=`start, ~justify=`around, ~fullHeight=false, ~children) => { + let className = + Cx.make([ + "flex flex-col", + fullHeight ? "h-full" : "h-auto", + "gap-" ++ Int.to_string(gap), + switch (align) { + | `start => "items-start" + | `center => "items-center" + | `end_ => "items-end" + }, + switch (justify) { + | `around => "justify-around" + | `between => "justify-between" + | `evenly => "justify-evenly" + | `start => "justify-start" + | `center => "justify-center" + | `end_ => "justify-end" + }, + ]); + +
children
; +}; -- cgit v1.2.3