1
0
Fork 0

wip: Started working on new development environment

This commit is contained in:
Joost De Cock 2022-01-22 17:55:03 +01:00
parent ace86eaf85
commit 54aefa8437
45 changed files with 1722 additions and 43 deletions

View file

@ -1,7 +1,7 @@
import themes from 'shared/themes/index.js'
import ThemeIcon from 'shared/components/icons/theme.js'
const ThemePicker = ({ app, className='' }) => {
const ThemePicker = ({ app, className }) => {
return (
<div className={`dropdown ${className}`}>
<div tabIndex="0" className={`
@ -10,15 +10,25 @@ const ThemePicker = ({ app, className='' }) => {
hover:bg-neutral hover:border-neutral-content
`}>
<ThemeIcon />
<span>{app.theme}</span>
<span>Theme</span>
<span>{app.i18n
? app.t(`${app.theme}Theme`)
: `${app.theme} Theme`
}</span>
</div>
<ul tabIndex="0" className="p-2 shadow menu dropdown-content bg-base-100 rounded-box w-52">
<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-ghost text-base-content hover:bg-base-200">
{theme}
<span>&nbsp;Theme</span>
<button
onClick={() => app.setTheme(theme)}
className="btn btn-ghost text-base-content hover:bg-base-200"
>
{app.i18n
? app.t(`${app.theme}Theme`)
: `${app.theme} Theme`
}
</button>
</li>
))}