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/Row.re | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 bs5/universal/native/shared/Row.re (limited to 'bs5/universal/native/shared/Row.re') diff --git a/bs5/universal/native/shared/Row.re b/bs5/universal/native/shared/Row.re new file mode 100644 index 0000000..451fa73 --- /dev/null +++ b/bs5/universal/native/shared/Row.re @@ -0,0 +1,33 @@ +[@react.component] +let make = + ( + ~gap=0, + ~align: Theme.align=`start, + ~justify: Theme.justify=`around, + ~fullHeight=false, + ~fullWidth=false, + ~children, + ) => { + let className = + Cx.make([ + "flex row", + fullHeight ? "h-full" : "h-auto", + fullWidth ? "w-full" : "w-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