import { useState } from 'react' import { ChevronRight, Cross } from '@components/icons' import { useToggleTheme } from '@lib/hooks/useToggleTheme' import cn from 'clsx' import ClickOutside from '@lib/click-outside' import ThemeIcon from './ThemeIcon' const ThemeSwitcher = () => { const [display, setDisplay] = useState(false) const { theme, themes, setTheme } = useToggleTheme() return ( setDisplay(false)}>
setDisplay(!display)} >
{themes.length && display ? (
    {themes.map((t: string) => (
  • ))}
) : null}
) } export default ThemeSwitcher