|
| 1 | +import {ProductCard, Content, Footer, Text, LinkButton} from '@react-spectrum/s2'; |
| 2 | +import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; |
| 3 | +import {TAB_DEFS} from '../src/constants'; |
| 4 | +// @ts-ignore |
| 5 | +import url from 'url:../assets/wallpaper_collaborative_S2_desktop.webp'; |
| 6 | + |
| 7 | +export function WelcomeHeader() { |
| 8 | + return ( |
| 9 | + <header |
| 10 | + style={{ |
| 11 | + backgroundImage: `url(${url})`, |
| 12 | + backgroundSize: 'cover' |
| 13 | + }} |
| 14 | + className={style({ |
| 15 | + paddingX: 48, |
| 16 | + paddingY: 96, |
| 17 | + marginTop: { |
| 18 | + default: -12, |
| 19 | + lg: -40 |
| 20 | + }, |
| 21 | + marginX: { |
| 22 | + default: -12, |
| 23 | + lg: -40 |
| 24 | + }, |
| 25 | + marginBottom: 48 |
| 26 | + })}> |
| 27 | + <h1 className={style({font: 'heading-2xl', color: 'white'})}> |
| 28 | + React Spectrum Libraries |
| 29 | + </h1> |
| 30 | + </header> |
| 31 | + ); |
| 32 | +} |
| 33 | + |
| 34 | +export function LibraryCards() { |
| 35 | + return ( |
| 36 | + <div className={style({display: 'flex', gap: 20, flexWrap: 'wrap', justifyContent: {default: 'center', lg: 'start'}})}> |
| 37 | + <ProductCard size="L"> |
| 38 | + {TAB_DEFS['react-spectrum'].icon} |
| 39 | + <Content> |
| 40 | + <Text slot="title">{TAB_DEFS['react-spectrum'].label}</Text> |
| 41 | + <Text slot="description">{TAB_DEFS['react-spectrum'].description}</Text> |
| 42 | + </Content> |
| 43 | + <Footer> |
| 44 | + <LinkButton href="s2/index.html" variant="accent">Get started</LinkButton> |
| 45 | + </Footer> |
| 46 | + </ProductCard> |
| 47 | + |
| 48 | + <ProductCard size="L"> |
| 49 | + {TAB_DEFS['react-aria'].icon} |
| 50 | + <Content> |
| 51 | + <Text slot="title">{TAB_DEFS['react-aria'].label}</Text> |
| 52 | + <Text slot="description">{TAB_DEFS['react-aria'].description}</Text> |
| 53 | + </Content> |
| 54 | + <Footer> |
| 55 | + <LinkButton href="react-aria/Autocomplete.html" variant="accent">Explore</LinkButton> |
| 56 | + </Footer> |
| 57 | + </ProductCard> |
| 58 | + |
| 59 | + <ProductCard size="L"> |
| 60 | + {TAB_DEFS['internationalized'].icon} |
| 61 | + <Content> |
| 62 | + <Text slot="title">{TAB_DEFS['internationalized'].label}</Text> |
| 63 | + <Text slot="description">{TAB_DEFS['internationalized'].description}</Text> |
| 64 | + </Content> |
| 65 | + <Footer> |
| 66 | + <LinkButton href="internationalized/date/index.html" variant="accent">Show Packages</LinkButton> |
| 67 | + </Footer> |
| 68 | + </ProductCard> |
| 69 | + </div> |
| 70 | + ); |
| 71 | +} |
0 commit comments