MCPcopy Create free account
hub / github.com/fontsource/fontsource / BadgeGroup

Function BadgeGroup

website/app/components/preview/InstallCode.tsx:46–61  ·  view source on GitHub ↗
({ items, onClick, isActive, mt }: BadgeGroupProps)

Source from the content-addressed store, hash-verified

44const DISPLAYS = ['auto', 'swap', 'block', 'fallback', 'optional'];
45
46const BadgeGroup = ({ items, onClick, isActive, mt }: BadgeGroupProps) => (
47 <Group mt={mt}>
48 {items.map((item) => (
49 <Badge
50 key={item}
51 className={classes.badge}
52 onClick={() => {
53 onClick(item);
54 }}
55 data-active={Boolean(isActive(item))}
56 >
57 {item}
58 </Badge>
59 ))}
60 </Group>
61);
62
63const VariableSimple = ({ metadata, variable }: InstallCodeProps) => {
64 const [isActive, setActive] = useState<Record<string, boolean>>({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected