import Fixture from '../../Fixture'; const React = window.React; class NumberTestCase extends React.Component { state = {value: ''}; onChange = event => { const parsed = parseFloat(event.target.value, 10); const value = isNaN(parsed) ? '' : parsed; this.setState({value}); }; render() { return (
{this.props.children}
Controlled {' '} Value: {JSON.stringify(this.state.value)}
Uncontrolled
); } } export default NumberTestCase;