because I got bored of customising my CV for every job
1import { cva, type VariantProps } from "class-variance-authority";
2import { cn } from "../lib/cn";
3
4const statusDotVariants = cva("inline-block shrink-0 rounded-full", {
5 variants: {
6 color: {
7 green: "bg-ctp-green",
8 red: "bg-ctp-red",
9 yellow: "bg-ctp-yellow",
10 gray: "bg-ctp-overlay0",
11 },
12 size: {
13 sm: "h-2 w-2",
14 md: "h-2.5 w-2.5",
15 lg: "h-3 w-3",
16 },
17 },
18 defaultVariants: {
19 color: "green",
20 size: "md",
21 },
22});
23
24type StatusDotVariants = VariantProps<typeof statusDotVariants>;
25
26interface StatusDotProps extends StatusDotVariants {
27 className?: string;
28}
29
30export const StatusDot = ({ color, size, className }: StatusDotProps) => (
31 <span className={cn(statusDotVariants({ color, size }), className)} />
32);