Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion redisinsight/ui/src/contexts/themeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
themeLight,
themeDark,
} from '@redis-ui/styles'
import { legacyDarkTheme } from 'uiSrc/styles/themes/legacy-theme-override'
import '@redis-ui/styles/normalized-styles.css'
import '@redis-ui/styles/fonts.css'

Expand Down Expand Up @@ -82,10 +83,11 @@ export class ThemeProvider extends React.Component<Props> {
const { theme, usingSystemTheme }: any = this.state
const uiTheme =
theme === Theme.Dark
? themeDark
? legacyDarkTheme
: theme === Theme.Light
? themeLight
: redisUiOldTheme

return (
<ThemeContext.Provider
value={{
Expand Down
38 changes: 38 additions & 0 deletions redisinsight/ui/src/styles/themes/legacy-theme-override.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { themeDark } from '@redis-ui/styles'
import { merge } from 'lodash'

// Legacy dark theme primary color
const LEGACY_DARK_PRIMARY = '#8ba2ff'

// Component overrides for hardcoded #80dbff colors
const componentOverrides = {
switchButton: {
toggleStates: {
on: {
normal: {
bgColor: LEGACY_DARK_PRIMARY,
borderColor: LEGACY_DARK_PRIMARY,
}
}
}
},
radio: {
variants: {
primary: {
on: {
normal: {
bgColor: LEGACY_DARK_PRIMARY,
}
}
}
}
}
}

// Theme overrides at root level for flexibility
const themeOverrides = {
components: componentOverrides
}

// Create modified dark theme with legacy colors
export const legacyDarkTheme = merge({}, themeDark, themeOverrides)
Loading