Skip to content

Commit 415a29e

Browse files
sfc-gh-pchiusfc-gh-bnisco
authored andcommitted
[theming] Use dark mix for hovered color instead of theme.colors.secondaryBg (#10930)
1 parent fb4031d commit 415a29e

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

frontend/app/src/components/MainMenu/styled-components.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const StyledCoreItem = styled.li<ItemStyleProps>(
110110
({ isHighlighted, styleProps, theme }) => {
111111
const highlightedStyles = isHighlighted && {
112112
"&:hover": {
113-
backgroundColor: theme.colors.secondaryBg,
113+
backgroundColor: theme.colors.darkenedBgMix15,
114114
},
115115
}
116116

@@ -138,7 +138,7 @@ export const StyledDevItem = styled.li<ItemStyleProps>(
138138
"&:hover": {
139139
// Whatever color we use here as the hover state, we want to transparentize it
140140
// to its full extend, so you can see the underlying color of the menu.
141-
backgroundColor: transparentize(theme.colors.secondaryBg, 1),
141+
backgroundColor: transparentize(theme.colors.darkenedBgMix15, 1),
142142
},
143143
}
144144
const margin = styleProps?.margin || 0

frontend/app/src/components/StreamlitDialog/styled-components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const StyledCheckbox = styled.input(({ theme }) => ({
115115
},
116116

117117
"&:disabled": {
118-
backgroundColor: theme.colors.secondaryBg,
118+
backgroundColor: theme.colors.darkenedBgMix15,
119119
},
120120
}))
121121

frontend/lib/src/components/elements/ArrowVegaLiteChart/styled-components.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const StyledVegaLiteChartContainer =
155155
textDecoration: "none",
156156
},
157157
"a:hover, a:focus": {
158-
backgroundColor: theme.colors.secondaryBg,
158+
backgroundColor: theme.colors.darkenedBgMix15,
159159
color: theme.colors.bodyText,
160160
},
161161
":before": {
@@ -211,7 +211,7 @@ export const StyledVegaLiteChartContainer =
211211
boxShadow: "none",
212212
color: theme.colors.bodyText,
213213
opacity: "1 !important",
214-
background: theme.colors.darkenedBgMix25,
214+
background: theme.colors.darkenedBgMix15,
215215
},
216216
svg: {
217217
width: theme.iconSizes.md,

frontend/lib/src/components/shared/Dropdown/styled-components.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@ import { StyledDropdownListItem } from "baseui/select"
2121
export const ThemedStyledDropdownListItem = styled(StyledDropdownListItem, {
2222
shouldForwardProp: isPropValid,
2323
})(({ theme, $isHighlighted }) => {
24-
const backgroundColor = theme.inSidebar
25-
? theme.colors.bgColor
26-
: theme.colors.secondaryBg
2724
return {
2825
display: "flex",
2926
alignItems: "center",
3027
paddingTop: theme.spacing.none,
3128
paddingBottom: theme.spacing.none,
3229
paddingLeft: theme.spacing.lg,
3330
paddingRight: theme.spacing.lg,
34-
background: $isHighlighted ? backgroundColor : undefined,
31+
background: $isHighlighted ? theme.colors.darkenedBgMix15 : undefined,
3532

3633
// Override the default itemSize set on the component's JSX
3734
// on mobile, so we can make list items taller and scrollable
@@ -40,7 +37,7 @@ export const ThemedStyledDropdownListItem = styled(StyledDropdownListItem, {
4037
height: "auto !important",
4138
},
4239
"&:hover, &:active, &:focus-visible": {
43-
background: backgroundColor,
40+
background: theme.colors.darkenedBgMix15,
4441
},
4542
}
4643
})

frontend/lib/src/components/widgets/DataFrame/hooks/useCustomTheme.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ function useCustomTheme(): Readonly<CustomGridTheme> {
7777
bgIconHeader: theme.colors.fadedText60,
7878
fgIconHeader: theme.colors.white,
7979
bgHeader: theme.colors.bgMix,
80-
bgHeaderHasFocus: theme.colors.secondaryBg,
81-
bgHeaderHovered: theme.colors.secondaryBg,
80+
bgHeaderHasFocus: theme.colors.darkenedBgMix15,
81+
bgHeaderHovered: theme.colors.darkenedBgMix15,
8282
textHeader: theme.colors.fadedText60,
8383
textHeaderSelected: theme.colors.white,
8484
textGroupHeader: theme.colors.fadedText60,

frontend/lib/src/components/widgets/DateInput/DateInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ function DateInput({
246246
$pseudoSelected ||
247247
$pseudoHighlighted ||
248248
$isHovered
249-
? `${colors.secondaryBg} !important`
249+
? `${colors.darkenedBgMix15} !important`
250250
: colors.transparent,
251251
},
252252

0 commit comments

Comments
 (0)