MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / Tag

Function Tag

apps/baseai.dev/src/components/Tag.tsx:38–58  ·  view source on GitHub ↗
({
	children,
	variant = 'medium',
	color = valueColorMap[children] ?? 'indigo'
}: {
	children: keyof typeof valueColorMap & (string | {});
	variant?: keyof typeof variantStyles;
	color?: keyof typeof colorStyles;
})

Source from the content-addressed store, hash-verified

36} as Record<string, keyof typeof colorStyles>;
37
38export function Tag({
39 children,
40 variant = 'medium',
41 color = valueColorMap[children] ?? 'indigo'
42}: {
43 children: keyof typeof valueColorMap & (string | {});
44 variant?: keyof typeof variantStyles;
45 color?: keyof typeof colorStyles;
46}) {
47 return (
48 <span
49 className={clsx(
50 'rounded-md bg-background px-2 font-mono text-[0.625rem] font-semibold leading-6',
51 variantStyles[variant],
52 colorStyles[color][variant]
53 )}
54 >
55 {children}
56 </span>
57 );
58}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected