chore(config): fix type definition of selected theme value

This commit is contained in:
kunish 2023-09-25 23:00:06 +08:00
parent c8104f07a3
commit ce3065e22e
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -389,7 +389,9 @@ const ConfigForXd = () => {
<select <select
class="select select-bordered" class="select select-bordered"
value={favDayTheme()} value={favDayTheme()}
onChange={(e) => setFavDayTheme(e.target.value)} onChange={(e) =>
setFavDayTheme(e.target.value as (typeof themes)[number])
}
> >
<For each={themes}> <For each={themes}>
{(theme) => <option value={theme}>{theme}</option>} {(theme) => <option value={theme}>{theme}</option>}
@ -403,7 +405,9 @@ const ConfigForXd = () => {
<select <select
class="select select-bordered" class="select select-bordered"
value={favNightTheme()} value={favNightTheme()}
onChange={(e) => setFavNightTheme(e.target.value)} onChange={(e) =>
setFavNightTheme(e.target.value as (typeof themes)[number])
}
> >
<For each={themes}> <For each={themes}>
{(theme) => <option value={theme}>{theme}</option>} {(theme) => <option value={theme}>{theme}</option>}