mirror of
https://github.com/acid-info/logos-press-engine.git
synced 2025-02-23 06:38:27 +00:00
fix: display/hide theme switch icon with css so it works on first render
This commit is contained in:
parent
324d0eef04
commit
5301bd2fe8
@ -11,11 +11,8 @@ interface Props {
|
||||
export const ThemeSwitch = ({ toggle, mode }: Props) => {
|
||||
return (
|
||||
<IconButton size="small" onClick={() => toggle()}>
|
||||
{mode === 'light' ? (
|
||||
<MoonIcon color="primary" />
|
||||
) : (
|
||||
<SunIcon color="primary" />
|
||||
)}
|
||||
<MoonIcon color="primary" className="dark-mode-hidden" />
|
||||
<SunIcon color="primary" className="light-mode-hidden" />
|
||||
</IconButton>
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user