import { AccessibleIcon, css, cssVar, Grid, LinkButton, Text, theme, webstudioBrand, } from "@webstudio-is/design-system"; import { WebstudioIcon } from "@webstudio-is/icons"; const pageStyle = css({ position: "fixed", justifyItems: "center", alignContent: "start", inset: 0, background: webstudioBrand.backgroundGradient, paddingTop: "10vh", // prevent global root styles override error color color: `light-dark( ${cssVar("--foreground-primary", "#11181c")}, ${cssVar("--foreground-on-inverse", "#fff")} )`, }); const standaloneButtonBackground = cssVar("--background-accent", "#096cff"); const standaloneButtonForeground = cssVar("--foreground-on-accent", "#fff"); const standaloneButtonHoverOverlay = `oklch(from ${standaloneButtonForeground} 0 0 h / 6.2745%)`; const standaloneButtonPressedOverlay = `oklch(from ${standaloneButtonForeground} 0 0 h / 10.9804%)`; const standaloneButtonStyle = { background: standaloneButtonBackground, color: standaloneButtonForeground, "&&[data-state=auto]:hover, &&[data-state=hover]": { background: `linear-gradient(${standaloneButtonHoverOverlay}, ${standaloneButtonHoverOverlay}), ${standaloneButtonBackground}`, color: standaloneButtonForeground, }, "&&[data-state=auto]:focus-visible, &&[data-state=focus]": { color: standaloneButtonForeground, outline: `1px solid ${cssVar("--border-focus", "#297aff")}`, outlineOffset: "1px", }, "&&[data-state=auto]:active, &&[data-state=pressed]": { background: `linear-gradient(${standaloneButtonPressedOverlay}, ${standaloneButtonPressedOverlay}), ${standaloneButtonBackground}`, color: standaloneButtonForeground, }, }; export const ErrorMessage = ({ error, }: { error: { status: number; statusText?: string; message: string; description?: string; }; }) => { return (
{error.status} {error.message ?? error.statusText} {error.description && ( {error.description} )} Go home ); };