|
1 | | -import { Button } from '@callstack/rspress-theme'; |
2 | | -import { getCustomMDXComponent } from '@rspress/core/theme'; |
| 1 | +import { Button, HomeHero } from '@callstack/rspress-theme'; |
| 2 | +import { getCustomMDXComponent, HomeBackground } from '@rspress/core/theme'; |
| 3 | +import clsx from 'clsx'; |
| 4 | + |
3 | 5 | import styles from './Hero.module.css'; |
4 | 6 |
|
5 | 7 | export function Hero() { |
6 | 8 | return ( |
7 | | - <div className="rp-relative"> |
8 | | - <div |
9 | | - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions |
10 | | - className={`rp-overflow-hidden rp-max-w-6xl ${styles.container}`} |
11 | | - > |
12 | | - <div className={styles.heroMain}> |
13 | | - <h1 className={styles.heroName}> |
14 | | - Create & build React Native libraries |
15 | | - </h1> |
16 | | - </div> |
| 9 | + <> |
| 10 | + <HomeBackground /> |
17 | 11 |
|
18 | | - <div className={styles.featureList}> |
19 | | - <Feature |
20 | | - title="Create" |
21 | | - description="Scaffold a new React Native library with everything pre-configured. Choose between templates such as Turbo Modules or" |
22 | | - code={`npx create-react-native-library@latest`} |
23 | | - link="/react-native-builder-bob/create" |
24 | | - /> |
25 | | - <Feature |
26 | | - title="Build" |
27 | | - description="Compile your React Native library to work with multiple tools. Support Metro, Webpack, Vite, NodeJS & more with a single build." |
28 | | - code={`npx react-native-builder-bob@latest init`} |
29 | | - link="/react-native-builder-bob/build" |
30 | | - /> |
31 | | - </div> |
32 | | - </div> |
33 | | - </div> |
| 12 | + <HomeHero |
| 13 | + afterHeroActions={ |
| 14 | + <div className={clsx('rp-home-feature', styles.featureList)}> |
| 15 | + <Feature |
| 16 | + title="Create" |
| 17 | + description="Scaffold a new React Native library with everything pre-configured. Choose between templates such as Turbo Modules or Nitro Modules." |
| 18 | + code={`npx create-react-native-library@latest`} |
| 19 | + link="/react-native-builder-bob/create" |
| 20 | + /> |
| 21 | + <Feature |
| 22 | + title="Build" |
| 23 | + description="Compile your React Native library to work with multiple tools. Support Metro, Webpack, Vite, NodeJS & more with a single build." |
| 24 | + code={`npx react-native-builder-bob@latest init`} |
| 25 | + link="/react-native-builder-bob/build" |
| 26 | + /> |
| 27 | + </div> |
| 28 | + } |
| 29 | + /> |
| 30 | + </> |
34 | 31 | ); |
35 | 32 | } |
36 | 33 |
|
@@ -64,6 +61,7 @@ function Feature({ |
64 | 61 | {code.split(' ').map((part, index) => { |
65 | 62 | return ( |
66 | 63 | <span |
| 64 | + key={index} |
67 | 65 | style={{ |
68 | 66 | color: |
69 | 67 | index === 0 |
|
0 commit comments