import { Fragment } from 'react' import themes from 'shared/themes/index.js' import { ThemeIcon, DownIcon } from 'shared/components/icons.mjs' import { useTranslation } from 'next-i18next' import { Popover, Transition } from '@headlessui/react' import { useTheme } from 'shared/hooks/use-theme.mjs' export const ns = ['themes'] export const ThemePicker = ({ app, iconOnly = false, bottom = false }) => { const [theme, setTheme] = useTheme() const { t } = useTranslation(ns) return ( {() => ( <> {!iconOnly && ( {t(`${theme}Theme`)} )}
{Object.keys(themes).map((theme) => ( ))}
)}
) }