Skip to content

Commit

Permalink
fix: ensure icons adapt to theme changes with CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
jeangovil committed Dec 15, 2023
1 parent d417e8c commit e9dc989
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ type TProps = {

export const Icon = (props: TProps): JSX.Element => {
const { children, size = 'm' } = props
const { colorMode, setColorMode } = useColorMode()

return (
<div
className={clsx(
styles.icon,
colorMode === 'dark' ? styles.dark : styles.light,
styles[size],
props.stroke && styles.stroke,
props.fill && styles.fill,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
width: 40px;
}
}
}

&.dark {
[data-theme='dark'] {
.icon {
&.fill {
&,
* {
Expand All @@ -30,7 +32,10 @@
}
}
}
&.light {
}

[data-theme='light'] {
.icon {
&.fill {
&,
* {
Expand Down

0 comments on commit e9dc989

Please sign in to comment.