import themes from 'shared/themes/index.js' import ThemeIcon from 'shared/components/icons/theme.js' import {useRef} from 'react' import { useTranslation } from 'next-i18next' import Picker, {PickerButton} from './picker'; import { Menu } from '@headlessui/react' const ThemePicker = ({ app, className, iconOnly=false }) => { const { t } = useTranslation(['themes']) const items = {}; for (var k in themes){ items[k] = {...themes[k], key: k} } const pickerProps = { className, iconOnly, Icon: ThemeIcon, selectedItem: t(`${app.theme}Theme`) } return ( {Object.keys(themes).map(theme => ( app.setTheme(theme)} key={theme}> {t(`${theme}Theme`)} ))} ) // return ( //
//
// // {!iconOnly && {t(`${app.theme}Theme`)}} //
// //
// ) // return null; } export default ThemePicker