Skip to content

Commit 120f00b

Browse files
committed
upgrade Docusaurus, fix layout shifts, apply theme to GH button
1 parent 3e7c7de commit 120f00b

5 files changed

Lines changed: 275 additions & 268 deletions

File tree

website/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@
4747
]
4848
},
4949
"dependencies": {
50-
"@docusaurus/core": "3.9.0",
51-
"@docusaurus/faster": "3.9.0",
52-
"@docusaurus/plugin-google-gtag": "3.9.0",
53-
"@docusaurus/plugin-pwa": "3.9.0",
54-
"@docusaurus/preset-classic": "3.9.0",
50+
"@docusaurus/core": "3.9.1",
51+
"@docusaurus/faster": "3.9.1",
52+
"@docusaurus/plugin-google-gtag": "3.9.1",
53+
"@docusaurus/plugin-pwa": "3.9.1",
54+
"@docusaurus/preset-classic": "3.9.1",
5555
"docusaurus-plugin-sass": "^0.2.6",
5656
"react": "^19.1.1",
5757
"react-dom": "^19.1.1",
5858
"react-github-btn": "^1.4.0"
5959
},
6060
"devDependencies": {
61-
"@docusaurus/module-type-aliases": "3.9.0",
62-
"@docusaurus/tsconfig": "3.9.0",
63-
"@docusaurus/types": "3.9.0",
61+
"@docusaurus/module-type-aliases": "3.9.1",
62+
"@docusaurus/tsconfig": "3.9.1",
63+
"@docusaurus/types": "3.9.1",
6464
"@react-native-website/lint-examples": "*",
6565
"@types/google.analytics": "^0.0.46",
6666
"@types/react": "^19.1.13",

website/src/components/Home/Hero/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import React from 'react';
99
import GitHubButton from 'react-github-btn';
10+
import {useColorMode} from '@docusaurus/theme-common';
1011

1112
import Logo from '../Logo';
1213
import GridBackground from './GridBackground';
@@ -16,6 +17,7 @@ import Devices from './Devices';
1617
import styles from './styles.module.css';
1718

1819
function Hero() {
20+
const {colorMode} = useColorMode();
1921
return (
2022
<div className={styles.container}>
2123
<div className={styles.socialLinks}>
@@ -30,6 +32,7 @@ function Hero() {
3032
href="https://github.com/facebook/react-native"
3133
data-icon="octicon-star"
3234
data-size="large"
35+
data-color-scheme={colorMode}
3336
aria-label="Star facebook/react-native on GitHub">
3437
Star
3538
</GitHubButton>

website/src/components/Home/Hero/styles.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
gap: 1rem;
2323
margin-top: 1rem;
2424
margin-right: 1rem;
25+
min-height: 36px;
26+
font-size: 14px;
2527
}
2628

2729
.gridBackground {

website/src/css/customTheme.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ So we need to "revert" some CSS vars to not enforce dark mode
10751075
}
10761076

10771077
.DocSearch-Button-Keys {
1078-
min-width: auto;
1078+
min-width: 42px;
10791079
margin-right: 4px;
10801080
margin-top: 1px;
10811081
gap: 2px;
@@ -1085,7 +1085,7 @@ So we need to "revert" some CSS vars to not enforce dark mode
10851085
font-weight: 600;
10861086
background: color-mix(
10871087
in srgb,
1088-
var(--docsearch-subtle-color) 30%,
1088+
var(--docsearch-subtle-color) 40%,
10891089
transparent
10901090
);
10911091
color: var(--docsearch-muted-color);
@@ -1099,9 +1099,10 @@ So we need to "revert" some CSS vars to not enforce dark mode
10991099
.DocSearch-Commands-Key {
11001100
background: color-mix(
11011101
in srgb,
1102-
var(--docsearch-subtle-color) 30%,
1102+
var(--docsearch-subtle-color) 40%,
11031103
transparent
11041104
);
1105+
border-radius: var(--ifm-code-border-radius);
11051106
color: var(--docsearch-muted-color);
11061107
}
11071108

@@ -1180,6 +1181,7 @@ html[data-theme="dark"] {
11801181
transparent
11811182
);
11821183
}
1184+
11831185
.DocSearch-Commands-Key {
11841186
background: color-mix(
11851187
in srgb,

0 commit comments

Comments
 (0)