import React, { useContext } from 'react' import { Box, Button, Flex, Menu, MenuButton, MenuItem, MenuList, Portal, Text, } from '@chakra-ui/react' import { themes } from '../themes' import { ChevronDownIcon } from '@chakra-ui/icons' import { ThemeContext } from '../../util/themecontext' export const ThemeSelect = () => { type Theme = { [key: string]: string } const { emacsTheme, setEmacsTheme, highlightColor } = useContext(ThemeContext) return ( Theme } > {emacsTheme[0]} ''} justifyContent="space-between" alignItems="center" display="flex" > {Object.keys(themes).map((theme: string, i: number) => ( setEmacsTheme([theme, themes[theme]])} justifyContent="space-between" alignItems="center" display="flex" > {theme} {Object.values(themes[theme as string]).map((color: string) => { return })} ))} ) }