Create Loading.js

This commit is contained in:
Natxo
2026-03-31 12:19:54 +02:00
committed by GitHub
parent a4283ac66b
commit 40e22d183e

13
src/components/Loading.js Normal file
View File

@@ -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" }),
]),
);
};