An open-source, self-hosted system for apps built with web technologies.
save
zohayrslileh989228ded0cb
diff --git a/source/client/view/components/loading.tsx b/source/client/view/components/loading.tsxindex b96520d..0a8c240 100644--- a/source/client/view/components/loading.tsx+++ b/source/client/view/components/loading.tsx@@ -1,24 +1,34 @@-import { Surface, type SurfaceProps } from "@phreshos/react-ui"+import { Surface, useAppearance, useThemedValue, type SurfaceProps } from "@phreshos/react-ui"import Spinner from "./spinner"type LoadingProps = Omit<SurfaceProps, "material">/** A complete loading surface for unresolved content. */export default function ({ className, style, ...props }: LoadingProps) {+ const background = useThemedValue(useAppearance().colors).background- return <Surface+ return <div- {...props}-- material={{ opacity: 1 }}-- className={`inset-0 z-10 grid ${className ?? ""}`}+ className={`inset-0 z-10 ${className ?? ""}`}style={{ ...style, position: "absolute", borderRadius: style?.borderRadius ?? "inherit" }}>- <Spinner className="m-auto size-6" />+ <div+ aria-hidden="true"+ style={{ position: "absolute", inset: 0, borderRadius: "inherit", backgroundColor: background }}+ />++ <Surface+ {...props}+ className="absolute inset-0 grid"+ style={{ borderRadius: "inherit" }}+ >++ <Spinner className="m-auto size-6" />++ </Surface>- </Surface>+ </div>}