MCPcopy Create free account
hub / github.com/adobe/react-spectrum / StarterCard

Function StarterCard

packages/dev/s2-docs/src/StarterKits.tsx:20–53  ·  view source on GitHub ↗
({
  zip,
  previewHref,
  title,
  children
}: {
  zip: string;
  previewHref: string;
  title: string;
  children: ReactNode;
})

Source from the content-addressed store, hash-verified

18});
19
20function StarterCard({
21 zip,
22 previewHref,
23 title,
24 children
25}: {
26 zip: string;
27 previewHref: string;
28 title: string;
29 children: ReactNode;
30}) {
31 return (
32 <div className={style({display: 'flex', flexDirection: 'column', gap: 8})}>
33 <Card href={`${zip}.${gitHash}.zip`} download>
34 <div className={style({display: 'flex', alignItems: 'center'})}>
35 {children}
36 <Content styles={style({padding: 0, flexGrow: 1})}>
37 <Text slot="title">{title}</Text>
38 <Text slot="description">Download ZIP</Text>
39 </Content>
40 <Download />
41 </div>
42 </Card>
43 <Link
44 isStandalone
45 variant="secondary"
46 href={previewHref}
47 target="_blank"
48 UNSAFE_style={{width: 'fit-content'}}>
49 Preview
50 </Link>
51 </div>
52 );
53}
54
55const vanillaIcon = (
56 <svg viewBox="0 0 1000 1000" className={preview}>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected