import React from 'react' import { None, BW, Sharp } from './svg/WindowThemes' import { COLORS } from '../lib/constants' const WINDOW_THEMES_MAP = { none: None, sharp: Sharp, bw: BW } export const WINDOW_THEMES = Object.keys(WINDOW_THEMES_MAP) class ThemeSelect extends React.Component { select = theme => { if (this.props.selected !== theme) { this.props.onChange(theme) } } renderThemes() { return WINDOW_THEMES.map(theme => { const Img = WINDOW_THEMES_MAP[theme] const checked = this.props.selected === theme return (
) }) } render() { return (
Theme
{this.renderThemes()}
) } } export default ThemeSelect