Go, roboto! Launch!! 🤖

This commit is contained in:
Victoria Drake
2020-02-02 11:03:57 -05:00
parent 0aa1ae6f78
commit de4dcd5d21
37 changed files with 12479 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import React from 'react';
import calculate from '../logic/calculate';
import './App.css';
import ButtonPanel from './ButtonPanel';
import Display from './Display';
class App extends React.Component {
constructor(props) {
super(props)
this.state = {
total: null,
next: null,
operation: null
}
}
handleClick = buttonName => {
this.setState(calculate(this.state, buttonName))
}
render() {
return (
<div className="component-app">
Tacos
<Display value={this.state.next || this.state.total || '0'} />
<ButtonPanel clickHandler={this.handleClick} />
</div>
)
}
}
export default App