Skip to content

Commit

Permalink
fix: update theme logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs authored and pionxzh committed Apr 6, 2024
1 parent b764dc4 commit 7fbb50b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const JsonViewer = function JsonViewer<Value> (props: JsonViewerProps<Val
}
const isAutoDarkTheme = useThemeDetector()
const themeType = useMemo(() => props.theme === 'auto'
? (isAutoDarkTheme ? 'light' : 'dark')
? (isAutoDarkTheme ? 'dark' : 'light')
: props.theme ?? 'light', [isAutoDarkTheme, props.theme])
const theme = useMemo(() => {
const backgroundColor = typeof themeType === 'object'
Expand Down

0 comments on commit 7fbb50b

Please sign in to comment.