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

Function Install

website/app/components/preview/Install.tsx:52–111  ·  view source on GitHub ↗
({
	metadata,
	variable,
	downloadCount,
}: InstallProps)

Source from the content-addressed store, hash-verified

50};
51
52export const Install = ({
53 metadata,
54 variable,
55 downloadCount,
56}: InstallProps) => {
57 // TODO: Readd attribution to metadata
58 /**
59 // Replace any urls as well as () and <> with empty string
60 const replaceAttribution = metadata.license.attribution
61 .replace(/https?:\/\/[\S\n]+/g, '')
62 .replace(/([()<>])/g, '')
63 // Also replace emails
64 .replace(/[\w.]+@[\w.]+/g, '');
65
66 <Text>&copy; {replaceAttribution}</Text>
67
68 <Group spacing="xs">
69 <IconVersion />
70 <Text>Version: {metadata.version}</Text>
71 </Group>
72 */
73
74 return (
75 <Grid className={globalClasses.container}>
76 <Grid.Col span={{ base: 12, md: 8 }}>
77 <Group justify="space-between" mb={28}>
78 <Title>Getting Started</Title>
79 <UnstyledButton
80 component={Link}
81 className={classes.button}
82 to="/docs/getting-started/install"
83 prefetch="intent"
84 >
85 <Group gap="xs">
86 Documentation
87 <IconExternal stroke="white" />
88 </Group>
89 </UnstyledButton>
90 </Group>
91 <Tabs defaultValue={variable ? 'variable' : 'static'}>
92 <Tabs.List>
93 {variable && <Tabs.Tab value="variable">Variable</Tabs.Tab>}
94 <Tabs.Tab value="static">Static</Tabs.Tab>
95 </Tabs.List>
96
97 <Tabs.Panel value="variable">
98 <Variable metadata={metadata} variable={variable} />
99 </Tabs.Panel>
100 <Tabs.Panel value="static">
101 <Static metadata={metadata} />
102 </Tabs.Panel>
103 </Tabs>
104 </Grid.Col>
105 <Grid.Col span={{ base: 12, md: 4 }}>
106 <InfoWrapper metadata={metadata} hits={downloadCount} />
107 <CarbonAd w={332} />
108 </Grid.Col>
109 </Grid>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected