Skip to content

Commit ff681ca

Browse files
committed
feat: support newest ck rspress theme and rspress 2.0.8
1 parent 727c8a2 commit ff681ca

File tree

6 files changed

+493
-585
lines changed

6 files changed

+493
-585
lines changed

docs/components/Hero.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
.codeBlock {
7070
position: relative;
7171
width: 100%;
72-
background-color: var(--rp-code-block-bg);
7372
color: var(--rp-code-block-color);
7473
margin: 8px 0;
7574
}

docs/components/Hero.tsx

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
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+
35
import styles from './Hero.module.css';
46

57
export function Hero() {
68
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 />
1711

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+
</>
3431
);
3532
}
3633

@@ -64,6 +61,7 @@ function Feature({
6461
{code.split(' ').map((part, index) => {
6562
return (
6663
<span
64+
key={index}
6765
style={{
6866
color:
6967
index === 0

docs/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
"dev": "rspress dev",
99
"preview": "rspress preview"
1010
},
11+
"type": "module",
1112
"dependencies": {
12-
"@callstack/rspress-preset": "^0.4.5",
13-
"@callstack/rspress-theme": "^0.4.5",
14-
"@rspress/core": "2.0.0-beta.34",
15-
"@shikijs/transformers": "^3.13.0"
13+
"@callstack/rspress-preset": "^0.6.3",
14+
"@callstack/rspress-theme": "^0.6.3",
15+
"@rspress/core": "^2.0.8",
16+
"@shikijs/transformers": "^3.13.0",
17+
"clsx": "^2.1.1"
1618
},
1719
"devDependencies": {
1820
"@types/react": "^19.2.14"

docs/pages/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
pageType: custom
3+
hero:
4+
name: Create & build<br/>React Native<br/>libraries
35
---
46

57
import { HomeFooter, HomeBanner } from '@callstack/rspress-theme';

docs/rspress.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export default withCallstackPreset(
1313
'https://github.com/callstack/react-native-builder-bob/edit/main/docs/pages',
1414
rootUrl: 'https://oss.callstack.com/react-native-builder-bob',
1515
icon: 'assets/favicon.png',
16-
logoLight: 'logo-light.svg',
17-
logoDark: 'logo-dark.svg',
16+
logoLight: 'react-native-builder-bob/logo-light.svg',
17+
logoDark: 'react-native-builder-bob/logo-dark.svg',
1818
rootDir: 'pages',
1919
socials: {
2020
github: 'https://github.com/callstack/react-native-builder-bob',

0 commit comments

Comments
 (0)