From 40e22d183ec14db551062505bf78128d0fced8a5 Mon Sep 17 00:00:00 2001 From: Natxo <1172351+natxocc@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:19:54 +0200 Subject: [PATCH] Create Loading.js --- src/components/Loading.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/components/Loading.js diff --git a/src/components/Loading.js b/src/components/Loading.js new file mode 100644 index 0000000..902c631 --- /dev/null +++ b/src/components/Loading.js @@ -0,0 +1,13 @@ +import { $html, $if } from "sigpro"; + +/** LOADING (Overlay Component) */ +export const Loading = (props) => { + // Se espera un signal props.$show para controlar la visibilidad + return $if(props.$show, () => + $html("div", { + class: "fixed inset-0 z-[100] flex items-center justify-center backdrop-blur-sm bg-base-100/30" + }, [ + $html("span", { class: "loading loading-spinner loading-lg text-primary" }), + ]), + ); +};