import React from 'react'
import Input from '../Input'
import Button from '../Button'
import ListSetting from '../ListSetting'
import Popout from '../Popout'
import ColorPicker from '../ColorPicker'
import { HIGHLIGHT_KEYS, COLORS } from '../../lib/constants'
import { stringifyRGBA, generateId } from '../../lib/util'
const colorPickerStyle = {
backgroundColor: COLORS.BLACK,
padding: 0,
margin: '4px'
}
const colorPresets = []
const HighlightPicker = ({ title, onChange, color }) => (
)
const ThemeCreate = ({
theme,
themes,
highlights,
create,
updateHighlights,
name,
onInputChange
}) => {
const [preset, updatePreset] = React.useState(theme.id)
const [highlight, selectHighlight] = React.useState()
return (
Name
selectHighlight(null)}
onChange={id => {
updatePreset(id)
updateHighlights(themes.find(t => t.id === id).highlights)
}}
>
{({ name }) => {name}}
{HIGHLIGHT_KEYS.map(key => (
))}
{highlight && (
updateHighlights({ [highlight]: stringifyRGBA(rgb) })}
/>
)}
)
}
export default ThemeCreate