import * as React from 'react'; import { Intl } from '../../../Intl'; import { BoardSize } from '../../../chess/Constants'; import { FormControl, FormControlProps } from '../forms/FormControl'; interface SizeSelectorProps extends FormControlProps { defaultSize?: BoardSize; onChangeSize?: (size: BoardSize) => void; } export class SizeSelector extends React.Component { public static defaultProps: SizeSelectorProps = { defaultSize: BoardSize.Normal, } /** * constructor */ constructor(props: SizeSelectorProps) { super(props); } private onChange = (e) => { const { onChangeSize } = this.props; const size: BoardSize = e.target.value; if (onChangeSize) { onChangeSize(size); } } render() { const { defaultSize } = this.props; return ( ); } }