22 lines
446 B
TypeScript
22 lines
446 B
TypeScript
'use client'
|
|
|
|
import { Moon, Sun } from "lucide-react"
|
|
import { useEffect } from "react"
|
|
type Props = {activeTheme:string|undefined}
|
|
const ThemeIcon = (props:Props) => {
|
|
return (
|
|
<>
|
|
{props.activeTheme && props.activeTheme == 'dark' &&
|
|
<Sun/>
|
|
}
|
|
{props.activeTheme && props.activeTheme == 'light' &&
|
|
<Moon/>
|
|
}
|
|
{!props.activeTheme &&
|
|
<Sun/>
|
|
}
|
|
</>
|
|
)
|
|
}
|
|
export default ThemeIcon;
|