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

Function Tag

website/app/components/preview/TextArea.tsx:38–59  ·  view source on GitHub ↗
({ weight, active }: TagProps)

Source from the content-addressed store, hash-verified

36}
37
38const Tag = ({ weight, active }: TagProps) => {
39 const weightMap: Record<number, string> = {
40 100: 'Thin',
41 200: 'Extra Light',
42 300: 'Light',
43 400: 'Regular',
44 500: 'Medium',
45 600: 'Semi Bold',
46 700: 'Bold',
47 800: 'Extra Bold',
48 900: 'Black',
49 };
50
51 return (
52 <>
53 <Box className={classes.tag} data-active={active}>
54 {weightMap[weight]} {weight}
55 </Box>
56 <Box className={classes.horizontal} data-active={active} />
57 </>
58 );
59};
60
61const TextBox = observer(({ state$, family, weight, style }: TextBoxProps) => {
62 const { ref, focused } = useFocusWithin();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected