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