working animations

This commit is contained in:
2026-03-13 22:18:44 +01:00
parent d71bb5d26e
commit 4293eef824
8 changed files with 44 additions and 45 deletions

View File

@@ -4,10 +4,18 @@ import { Moon, Sun } from "lucide-react"
import { useEffect } from "react"
type Props = {activeTheme:string|undefined}
const ThemeIcon = (props:Props) => {
if (props.activeTheme == "dark") {
return (<Sun/>)
} else {
return (<Moon/>)
}
return (
<>
{props.activeTheme && props.activeTheme == 'dark' &&
<Sun/>
}
{props.activeTheme && props.activeTheme == 'light' &&
<Moon/>
}
{!props.activeTheme &&
<Sun/>
}
</>
)
}
export default ThemeIcon;