Fix theme shop themes not applying as a base

- [#217] fixed theme shop themes not applying as a base
- added `themes` state path to store themes locally at
This commit is contained in:
brecert
2021-09-11 15:40:14 -04:00
parent 5b422b89e3
commit 537f9b1596
6 changed files with 86 additions and 18 deletions

View File

@@ -98,7 +98,7 @@ export function Component(props: Props) {
useEffect(() => setOverride({ css }), [setOverride, css]);
const selected = props.settings.theme?.preset ?? "dark";
const selected = props.settings.theme?.base ?? "dark";
return (
<div className={styles.appearance}>
<h3>
@@ -113,7 +113,7 @@ export function Component(props: Props) {
data-active={selected === "light"}
onClick={() =>
selected !== "light" &&
setTheme({ preset: "light" })
setTheme({ base: "light" })
}
onContextMenu={(e) => e.preventDefault()}
/>
@@ -128,7 +128,7 @@ export function Component(props: Props) {
draggable={false}
data-active={selected === "dark"}
onClick={() =>
selected !== "dark" && setTheme({ preset: "dark" })
selected !== "dark" && setTheme({ base: "dark" })
}
onContextMenu={(e) => e.preventDefault()}
/>