import React, { Component } from 'react'; import { Container, Row, Col, Table, FormGroup, Input, Button } from 'reactstrap'; import Result from "./results" import Explain from "./explain" import 'bootstrap/dist/css/bootstrap.min.css'; import '../../App.css'; class Wheels extends Component { state = {}; constructor(props) { super(props); const sizes = []; for (let i = 10; i <= 24; i += 1) { sizes.push(i); } this.state = { sizes, showResult: false, oldWheelDiameter: 14, oldWheelWidth: 6.5, oldWheelET: 37, oldTyreWidth: 175, oldTyreHeight: 65, newWheelDiameter: 15, newWheelWidth: 7, newWheelET: 42, newTyreWidth: 195, newTyreHeight: 50, }; this.handleChange = this.handleChange.bind(this); this.submit = this.submit.bind(this); } handleChange(event) { const target = event.target; const value = target.type === 'checkbox' ? target.checked : target.value; const name = target.name; this.setState({ [name]: value, showResult: false }); } submit() { this.setState({ showResult: true }) console.log('compute!') } render() { return (

Calculez vos futures jantes et futurs pneus en ligne

Diamètre Jante Pneu
Actuel { this.state.sizes.map( item => ( ))}
Nouveau { this.state.sizes.map( item => ( ))}
{ this.state.showResult ? : (null) }
); } } export default Wheels;