1
0
Fork 0

feat(fs.dev): moved theme picker to header

This commit is contained in:
Joost De Cock 2021-12-30 17:55:46 +01:00
parent bb901c4d8a
commit 43a89a85ad

View file

@ -4,16 +4,17 @@ import ThemeIcon from 'shared/components/icons/theme.js'
const ThemePicker = ({ app, className='' }) => {
return (
<div className="dropdown">
<div tabIndex="0" className="m-0 btn flex flex-row gap-2">
<div tabIndex="0" className="m-0 btn flex flex-row gap-2 hover:bg-neutral hover:border-neutral-content">
<ThemeIcon />
<span>Theme:</span>
<span>{app.theme}</span>
<span>Theme</span>
</div>
<ul tabIndex="0" className="p-2 shadow menu dropdown-content bg-base-100 rounded-box w-52">
{Object.keys(themes).map(theme => (
<li key={theme}>
<button onClick={() => app.setTheme(theme)} className="btn btn-link">
<button onClick={() => app.setTheme(theme)} className="btn btn-ghost text-base-content hover:bg-base-200">
{theme}
<span>&nbsp;Theme</span>
</button>
</li>
))}