Skip to content

Commit

Permalink
Merge pull request #8245 from LedgerHQ/fix/live-14644
Browse files Browse the repository at this point in the history
fix: select placeholder styles in light mode
  • Loading branch information
KVNLS authored Oct 29, 2024
2 parents f63c04f + a50e05b commit dd4cb08
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-days-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": minor
---

Fix Select placeholder styles
13 changes: 11 additions & 2 deletions apps/ledger-live-desktop/src/renderer/components/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class Select<
...props
} = this.props;
const Comp = (async ? AsyncReactSelect : ReactSelect) as typeof ReactSelect;
let styles =
const baseStyles =
theme &&
createStyles(theme, {
width,
Expand All @@ -228,12 +228,21 @@ class Select<
error,
rowHeight,
});
const baseStylesWithPlaceholder = {
...baseStyles,
placeholder: (base: React.CSSProperties) => ({
...base,
color: theme?.colors.palette.text.shade40,
}),
};

// @ts-expect-error This is complicated to get it right
styles = stylesMap ? stylesMap(styles) : styles;
const styles = stylesMap ? stylesMap(baseStylesWithPlaceholder) : baseStylesWithPlaceholder;
return (
// @ts-expect-error This is complicated to get it right
<Comp
{...props}
// @ts-expect-error This is complicated to get it right
ref={c => (this.ref = c)}
autoFocus={autoFocus}
value={value}
Expand Down
5 changes: 0 additions & 5 deletions apps/ledger-live-desktop/src/renderer/styles/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,10 @@ export const GlobalStyle = createGlobalStyle`
left: 15px;
}
.select__placeholder {
color ${p => p.theme.colors.palette.text.shade40} !important;
}
::selection {
background: ${p => rgba(p.theme.colors.wallet, 0.1)};
}
--track-color: rgba(0,0,0,0);
::-webkit-scrollbar {
Expand Down

0 comments on commit dd4cb08

Please sign in to comment.