diff --git a/web/src/routes.tsx b/web/src/routes.tsx index 4ce35a6..5fda932 100644 --- a/web/src/routes.tsx +++ b/web/src/routes.tsx @@ -1,4 +1,5 @@ import type { QueryClient } from "@tanstack/react-query"; +import * as stylex from "@stylexjs/stylex"; import { createRootRouteWithContext, createRoute, @@ -27,16 +28,44 @@ import { upstreamHealthQuery, upstreamsQuery, } from "@/lib/queries"; -import { retryButtonClass } from "@/ui/classes"; +import { styles as shared } from "@/ui/styles"; +import { colors } from "@/ui/tokens.stylex"; export interface RouterContext { queryClient: QueryClient; } +const styles = stylex.create({ + pending: { + padding: "2rem", + textAlign: "center", + color: colors.textMuted, + }, + errorBox: { + margin: "1rem", + borderRadius: "0.25rem", + borderWidth: 1, + borderStyle: "solid", + borderColor: colors.dangerBorder, + backgroundColor: colors.dangerSurface, + padding: "1rem", + }, + errorTitle: { + fontWeight: 600, + color: colors.dangerText, + }, + errorDetail: { + marginTop: "0.25rem", + fontSize: "0.875rem", + lineHeight: "1.25rem", + color: colors.dangerText, + }, +}); + function RoutePending() { return ( -
- Loading… +
+ Loading…
); } @@ -59,13 +88,14 @@ function RouteError({ error }: ErrorComponentProps) { } } return ( -
-

{title}

-

{detail}

-