File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,10 @@ export default component$(({ showVersion = false }: HeaderProps) => {
130
130
const { theme, setTheme } = useTheme ( ) ;
131
131
132
132
const switchLightDark = $ ( ( input : string | string [ ] ) : string | string [ ] | undefined => {
133
- const switchWord = ( word : string ) : string => {
134
- if ( word . includes ( 'light' ) ) {
135
- return word . replace ( 'light' , 'dark' ) ;
136
- } else if ( word . includes ( 'dark' ) ) {
137
- return word . replace ( 'dark' , 'light' ) ;
138
- }
139
- return word ;
140
- } ;
141
-
133
+ const switchWord = ( word : string ) : string =>
134
+ word . includes ( 'light' )
135
+ ? word . replace ( 'light' , 'dark' )
136
+ : word . replace ( 'dark' , 'light' ) ;
142
137
if ( typeof input === 'string' ) {
143
138
return switchWord ( input ) ;
144
139
} else if ( Array . isArray ( input ) ) {
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export default component$(() => {
55
55
< body lang = "en" >
56
56
< ThemeProvider
57
57
attribute = "class"
58
+ enableSystem = { false }
58
59
themes = { [
59
60
...modeOptions ,
60
61
...fontOptions ,
You can’t perform that action at this time.
0 commit comments