1
0
Fork 0

wip(org): Tweaks to mobile header

This commit is contained in:
Joost De Cock 2022-06-04 18:30:30 +02:00
parent 61b38b4544
commit 0ded6ebbe6
3 changed files with 24 additions and 18 deletions

View file

@ -2,18 +2,20 @@ import themes from 'shared/themes/index.js'
import ThemeIcon from 'shared/components/icons/theme.js'
import { useTranslation } from 'next-i18next'
const ThemePicker = ({ app, className }) => {
const ThemePicker = ({ app, className, iconOnly=false }) => {
const { t } = useTranslation(['themes'])
return (
<div className={`dropdown ${className} w-full md:w-auto`}>
<div tabIndex="0" className={`
m-0 btn btn-neutral flex flex-row gap-2 btn-outline
md:btn-ghost
hover:bg-neutral hover:border-neutral-content
`}>
<div className={`dropdown dropdown-end ${className} w-auto`}>
<div tabIndex="0" className={iconOnly
? `btn btn-sm`
: `m-0 btn btn-neutral flex flex-row gap-2 btn-outline
md:btn-ghost
hover:bg-neutral hover:border-neutral-content
`}
>
<ThemeIcon />
<span>{t(`${app.theme}Theme`)}</span>
{!iconOnly && <span>{t(`${app.theme}Theme`)}</span>}
</div>
<ul
tabIndex="0"