diff --git a/src/assets/scss/keypad.scss b/src/assets/scss/keypad.scss index 8b10016..081ae58 100644 --- a/src/assets/scss/keypad.scss +++ b/src/assets/scss/keypad.scss @@ -19,18 +19,11 @@ grid-template-columns: repeat(4, 1fr); } .keypad-button { - &.clear { - background-color: red; - } - &.delete { - background-color: yellow; - } &.enter { grid-row: 3 / 5; grid-column: 4; - background-color: green; } - padding: 10px; + padding: 0px; font-size: 28px; font-weight: 500; background: #eee; diff --git a/src/components/KeyPad.jsx b/src/components/KeyPad.jsx index 5853bd0..89e9226 100644 --- a/src/components/KeyPad.jsx +++ b/src/components/KeyPad.jsx @@ -12,9 +12,12 @@ export default class KeyPad extends Component { handleKeyPress(value) { const { text } = this.state; const { onSubmit } = this.props; - if (value === 'enter' && text.length > 0) { - onSubmit(parseFloat(text)); - return this.setState({ text: '' }); + if (value === 'enter') { + if (text.length > 0) { + onSubmit(parseFloat(text)); + return this.setState({ text: '' }); + } + return null; } if (value === 'clear') { return this.setState({ text: '' }); diff --git a/src/components/KeyPadButtons.jsx b/src/components/KeyPadButtons.jsx index 6f3b39f..e791206 100644 --- a/src/components/KeyPadButtons.jsx +++ b/src/components/KeyPadButtons.jsx @@ -1,18 +1,24 @@ import React, { Component } from 'react'; +import { AnchorButton, ButtonGroup } from '@blueprintjs/core'; export default class KeyPadButtons extends Component { shouldComponentUpdate() { return false; } - renderButton(value, { content, className = '' } = {}) { + + renderButton(value, { content, className = '', intent } = {}) { const { onKeyPress } = this.props; return ( -