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.
1.1 kB ยท 41 lines
TSX
at incident-api
123456789101112131415161718192021222324252627282930313233343536373839404142import type { ChartConfig } from "@openstatus/ui/components/ui/chart";import type { NameType, ValueType,} from "recharts/types/component/DefaultTooltipContent";
interface ChartTooltipNumberProps { chartConfig: ChartConfig; value: ValueType; name: NameType; labelFormatter?: (value: ValueType, name: NameType) => React.ReactNode;}
export function ChartTooltipNumber({ value, name, chartConfig, labelFormatter,}: ChartTooltipNumberProps) { const label: React.ReactNode = labelFormatter ? labelFormatter(value, name) : chartConfig[name as keyof typeof chartConfig]?.label || name;
return ( <> <div className="h-2.5 w-2.5 shrink-0 rounded-xs bg-(--color-bg)" style={ { "--color-bg": `var(--color-${name})`, } as React.CSSProperties } /> <span>{label}</span> <div className="text-foreground ml-auto flex items-baseline gap-0.5 font-mono font-medium tabular-nums"> {value} <span className="text-muted-foreground font-normal">ms</span> </div> </> );}