Add support for system theme (#245)

* Add support for 'system' theme value

* Add ability to set theme to 'system' in settings

* Fix tsc errors for Theme
This commit is contained in:
Frank Noirot
2023-08-09 13:57:07 -04:00
committed by GitHub
parent 8ebb8b8b94
commit 968a67e654
7 changed files with 56 additions and 35 deletions

View File

@ -1,15 +1,15 @@
import ReactJson from 'react-json-view'
import { CollapsiblePanel, CollapsiblePanelProps } from './CollapsiblePanel'
import { useStore } from '../useStore'
import { Themes, useStore } from '../useStore'
import { useMemo } from 'react'
import { ProgramMemory } from '../lang/executor'
interface MemoryPanelProps extends CollapsiblePanelProps {
theme?: 'light' | 'dark'
theme?: Exclude<Themes, Themes.System>
}
export const MemoryPanel = ({
theme = 'light',
theme = Themes.Light,
...props
}: MemoryPanelProps) => {
const { programMemory } = useStore((s) => ({