mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Extract themeEngine
This commit is contained in:
parent
eb8025791b
commit
c9f42e497a
5 changed files with 30 additions and 28 deletions
|
|
@ -1,15 +1,16 @@
|
|||
import { h } from 'preact'
|
||||
|
||||
export default function ({ themeList, currentTheme, setTheme }) {
|
||||
const options = themeList.map(theme => (
|
||||
export default function ({ themeEngine }) {
|
||||
const options = themeEngine.themes.map(theme => (
|
||||
<option value={theme}>
|
||||
{theme}
|
||||
</option>))
|
||||
|
||||
return (
|
||||
<select
|
||||
value={currentTheme}
|
||||
onChange={({ target }) => setTheme(target.value)}>
|
||||
value={themeEngine.currentTheme}
|
||||
onChange={({ target }) =>
|
||||
themeEngine.setTheme(target.value)}>
|
||||
{options}
|
||||
</select>)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ const INITIAL_STATUS = {
|
|||
}
|
||||
|
||||
export default function ({url}) {
|
||||
console.log(123, url)
|
||||
const [status, setStatus] = useState(INITIAL_STATUS)
|
||||
|
||||
const [vm, setVM] = useState(null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue