component: add price on top of BuildControls
This commit is contained in:
parent
9a9f85110c
commit
54d018b854
@ -12,6 +12,7 @@ const controls = [
|
||||
|
||||
const buildControls = (props) => (
|
||||
<div className={classes.BuildControls}>
|
||||
<p>Current Price: <strong>{props.price.toFixed(2)}</strong></p>
|
||||
{controls.map( ctrl => (
|
||||
<BuildControl
|
||||
key={ctrl.name}
|
||||
|
@ -75,7 +75,8 @@ class BurgerBuilder extends Component {
|
||||
<BuildControls
|
||||
ingredientAdded={this.addIngredientHandler}
|
||||
ingredientRemoved={this.removeIngredientHandler}
|
||||
disabled={disabledInfo} />
|
||||
disabled={disabledInfo}
|
||||
price={this.state.totalPrice} />
|
||||
</Aux>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user