import * as React from 'react'; import { Intl } from '../../../Intl'; import { FormControl, FormControlProps } from '../forms/FormControl'; interface SquareSelectorProps extends FormControlProps { defaultSquare?: string; onChangeSquare?: (square: string) => void; } export class SquareSelector extends React.Component { public static defaultProps: SquareSelectorProps = { defaultValue: 'color-blue', } /** * constructor */ constructor(props: SquareSelectorProps) { super(props); } private onChange = (e) => { const { onChangeSquare } = this.props; const square = e.target.value; if (onChangeSquare) { onChangeSquare(square); } } render() { const { defaultSquare } = this.props; return ( ); } }