Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
850 B ยท 36 lines
TSX
at main
12345678910111213141516171819202122232425262728293031323334353637import { cn } from "@openstatus/ui/lib/utils";import { type VariantProps, cva } from "class-variance-authority";
const statusDotVariants = cva("inline-block size-2 shrink-0 rounded-full", { variants: { variant: { default: "bg-muted-foreground", success: "bg-success", warning: "bg-warning", destructive: "bg-destructive", info: "bg-info", }, }, defaultVariants: { variant: "default", },});
export type StatusVariant = NonNullable< VariantProps<typeof statusDotVariants>["variant"]>;
export function StatusDot({ className, variant, ...props}: React.ComponentProps<"span"> & VariantProps<typeof statusDotVariants>) { return ( <span data-slot="status-dot" aria-hidden="true" className={cn(statusDotVariants({ variant }), className)} {...props} /> );}