Skip to content

Commit bcfc705

Browse files
committed
fix: part 1
1 parent 41f9247 commit bcfc705

File tree

9 files changed

+43
-59
lines changed

9 files changed

+43
-59
lines changed

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"preview": "rspress preview"
99
},
1010
"dependencies": {
11-
"@callstack/rspress-theme": "0.2.0",
12-
"rspress": "2.0.0-beta.21"
11+
"@callstack/rspress-theme": "^0.2.0",
12+
"rspress": "^2.0.0-beta.21"
1313
},
1414
"devDependencies": {
15-
"@types/node": "^16",
15+
"@types/node": "^20",
1616
"rsbuild-plugin-open-graph": "^1.0.2"
1717
}
1818
}

docs/rspress.config.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ export default defineConfig({
1111
logoText: 'React Native Bottom Tabs',
1212
icon: '/img/phone.png',
1313
logo: '/img/phone.png',
14-
globalStyles: path.join(__dirname, 'styles.css'),
15-
ssg: false,
14+
globalStyles: path.join(__dirname, 'theme/styles.css'),
1615
themeConfig: {
1716
enableContentAnimation: true,
1817
enableAppearanceAnimation: false,
@@ -25,10 +24,7 @@ export default defineConfig({
2524
},
2625
],
2726
},
28-
plugins: [
29-
// @ts-ignore
30-
pluginCallstackTheme(),
31-
],
27+
plugins: [pluginCallstackTheme()],
3228
builderConfig: {
3329
plugins: [
3430
pluginOpenGraph({

docs/styles.css

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// theme/index.tsx
22
import {
3-
Announcement,
43
Button,
54
HomeBanner,
65
HomeFeature,
@@ -15,20 +14,10 @@ import {
1514
HomeLayout as RspressHomeLayout,
1615
Layout as RspressLayout,
1716
} from 'rspress/theme';
18-
import React from 'react';
1917

2018
// You can customize the default Layout and HomeLayout like this:
2119
const Layout = () => (
22-
<RspressLayout
23-
beforeNav={
24-
<Announcement
25-
href="./guide"
26-
message="React Native Bottom Tabs Documentation"
27-
localStorageKey="rn-bottom-tabs-announcement"
28-
/>
29-
}
30-
afterOutline={<OutlineCTA href="https://callstack.com" />}
31-
/>
20+
<RspressLayout afterOutline={<OutlineCTA href="https://callstack.com" />} />
3221
);
3322

3423
const HomeLayout = () => (
@@ -42,9 +31,6 @@ const HomeLayout = () => (
4231
/>
4332
);
4433

45-
// Export the default theme components
46-
export * from 'rspress/theme';
47-
4834
// Export your custom layouts and components
4935
export {
5036
Layout,
@@ -55,13 +41,7 @@ export {
5541
HomeHero,
5642
LinkCard,
5743
VersionBadge,
58-
Announcement,
5944
};
6045

61-
// Create a default export with the custom layouts
62-
const theme = {
63-
Layout,
64-
HomeLayout,
65-
};
66-
67-
export default theme;
46+
// Export the default theme components
47+
export * from 'rspress/theme';

docs/theme/styles.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@font-face {
2+
font-family: 'Alliance No. 2';
3+
font-style: normal;
4+
font-weight: 400;
5+
font-display: swap;
6+
src: url('https://cdn.prod.website-files.com/67e6b7885e182e1054b556db/67e6b8ee4fb44f39145cf744_AllianceNo2-Regular.ttf')
7+
format('truetype');
8+
}
9+
10+
@font-face {
11+
font-family: 'Alliance No. 2';
12+
font-style: normal;
13+
font-weight: 500;
14+
font-display: swap;
15+
src: url('https://cdn.prod.website-files.com/67e6b7885e182e1054b556db/67e6b8eed3d2262c4baebd90_AllianceNo2-Medium.ttf')
16+
format('truetype');
17+
}

yarn.lock

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ __metadata:
17851785
languageName: node
17861786
linkType: hard
17871787

1788-
"@callstack/rspress-theme@npm:0.2.0":
1788+
"@callstack/rspress-theme@npm:^0.2.0":
17891789
version: 0.2.0
17901790
resolution: "@callstack/rspress-theme@npm:0.2.0"
17911791
peerDependencies:
@@ -5612,10 +5612,12 @@ __metadata:
56125612
languageName: node
56135613
linkType: hard
56145614

5615-
"@types/node@npm:^16":
5616-
version: 16.18.126
5617-
resolution: "@types/node@npm:16.18.126"
5618-
checksum: 10/33e0fa9209a4a96459a8fdf6b078ca9590eb67a8d51899180cfac8afecb9aa133c755d1c38a8b947b9f384f2faa184cabf4e567f5f6dded285be1b31588ec199
5615+
"@types/node@npm:^20":
5616+
version: 20.19.8
5617+
resolution: "@types/node@npm:20.19.8"
5618+
dependencies:
5619+
undici-types: "npm:~6.21.0"
5620+
checksum: 10/f80d8f41597b91fa8a86d4e77fc02aa999412617107bf42b9a99b3bd5509fb354a936608d8ea9ea6110d4ca28ffa23f18f7c1ad0aefa4275b400877028270e9c
56195621
languageName: node
56205622
linkType: hard
56215623

@@ -15424,10 +15426,10 @@ __metadata:
1542415426
version: 0.0.0-use.local
1542515427
resolution: "react-native-bottom-tabs-docs@workspace:docs"
1542615428
dependencies:
15427-
"@callstack/rspress-theme": "npm:0.2.0"
15428-
"@types/node": "npm:^16"
15429+
"@callstack/rspress-theme": "npm:^0.2.0"
15430+
"@types/node": "npm:^20"
1542915431
rsbuild-plugin-open-graph: "npm:^1.0.2"
15430-
rspress: "npm:2.0.0-beta.21"
15432+
rspress: "npm:^2.0.0-beta.21"
1543115433
languageName: unknown
1543215434
linkType: soft
1543315435

@@ -16696,7 +16698,7 @@ __metadata:
1669616698
languageName: node
1669716699
linkType: hard
1669816700

16699-
"rspress@npm:2.0.0-beta.21":
16701+
"rspress@npm:^2.0.0-beta.21":
1670016702
version: 2.0.0-beta.21
1670116703
resolution: "rspress@npm:2.0.0-beta.21"
1670216704
dependencies:
@@ -18473,6 +18475,13 @@ __metadata:
1847318475
languageName: node
1847418476
linkType: hard
1847518477

18478+
"undici-types@npm:~6.21.0":
18479+
version: 6.21.0
18480+
resolution: "undici-types@npm:6.21.0"
18481+
checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14
18482+
languageName: node
18483+
linkType: hard
18484+
1847618485
"undici-types@npm:~7.8.0":
1847718486
version: 7.8.0
1847818487
resolution: "undici-types@npm:7.8.0"

0 commit comments

Comments
 (0)