This repository was archived by the owner on Feb 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +30
-16
lines changed
components/other/SectionScroller/components/SectionLeftItem Expand file tree Collapse file tree 3 files changed +30
-16
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,20 @@ export type Props = {
1111} ;
1212
1313const SectionLeftItem : React . FC < Props > = ( props ) => {
14- const { code, active, forwardRef, style } = props ;
14+ const { code, active, forwardRef, style } = props ;
1515
16- return (
17- < div
18- style = { style }
19- ref = { forwardRef }
20- className = { clsx ( styles . Container , {
21- [ styles . Container_Active ] : active ,
22- } ) } >
23- < CodeBlock style = { { position : 'relative' } } className = { 'javascript' } >
24- { code }
25- </ CodeBlock >
26- </ div >
27- ) ;
16+ return (
17+ < div
18+ style = { style }
19+ ref = { forwardRef }
20+ className = { clsx ( styles . Container , {
21+ [ styles . Container_Active ] : active ,
22+ } ) } >
23+ < CodeBlock style = { { position : 'relative' } } className = { 'javascript' } >
24+ { code }
25+ </ CodeBlock >
26+ </ div >
27+ ) ;
2828} ;
2929
3030export default SectionLeftItem ;
Original file line number Diff line number Diff line change @@ -102,9 +102,7 @@ const Navbar = (): JSX.Element => {
102102 isSearchBarExpanded = { isSearchBarExpanded }
103103 />
104104 </ div >
105- < BrowserOnly >
106- < Progressbar />
107- </ BrowserOnly >
105+ < BrowserOnly > { ( ) => < Progressbar /> } </ BrowserOnly >
108106 </ div >
109107
110108 { /* Donut */ }
Original file line number Diff line number Diff line change 1+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext' ;
2+ import { useAgile } from '@agile-ts/react' ;
3+ import core from '../../core' ;
4+ import defaultTheme from 'prism-react-renderer/themes/palenight' ;
5+
6+ const usePrismTheme = ( ) => {
7+ const { siteConfig } = useDocusaurusContext ( ) ;
8+ const prismTheme = siteConfig . themeConfig . prism . theme ;
9+ const lightModeTheme = prismTheme . theme || defaultTheme ;
10+ const darkModeTheme = prismTheme . darkTheme || lightModeTheme ;
11+ const themeType = useAgile ( core . ui . THEME_TYPE ) ;
12+
13+ return themeType === 'dark' ? darkModeTheme : lightModeTheme ;
14+ } ;
15+
16+ export default usePrismTheme ;
You can’t perform that action at this time.
0 commit comments