fix: ensure icons adapt to theme changes with CSS

This commit is contained in:
Hossein Mehrabi
2023-12-15 17:07:15 +03:30
parent d417e8ca1c
commit e9dc989506
2 changed files with 7 additions and 4 deletions
@@ -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,
@@ -15,8 +15,10 @@
width: 40px;
}
}
}
&.dark {
[data-theme='dark'] {
.icon {
&.fill {
&,
* {
@@ -30,7 +32,10 @@
}
}
}
&.light {
}
[data-theme='light'] {
.icon {
&.fill {
&,
* {