Improvements to propdefaults in button-group.component and basic-tab-content.component

feature/default_network_editable
Dan Miller 6 years ago
parent 0a7dfcd55d
commit d07d40cf7c
  1. 3
      ui/app/components/button-group/button-group.component.js
  2. 2
      ui/app/components/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js

@ -14,12 +14,13 @@ export default class ButtonGroup extends PureComponent {
static defaultProps = {
className: 'button-group',
defaultActiveButtonIndex: 0,
}
state = {
activeButtonIndex: this.props.noButtonActiveByDefault
? null
: this.props.defaultActiveButtonIndex || 0,
: this.props.defaultActiveButtonIndex,
}
handleButtonClick (activeButtonIndex) {

@ -16,11 +16,11 @@ export default class BasicTabContent extends Component {
<div className="basic-tab-content">
<div className="basic-tab-content__title">Suggest gas fee increases</div>
<GasPriceButtonGroup
{...this.props.gasPriceButtonGroupProps}
className="gas-price-button-group"
noButtonActiveByDefault={true}
showCheck={true}
handleGasPriceSelection={(newPrice) => console.log('New Price:', newPrice)}
{...this.props.gasPriceButtonGroupProps}
/>
</div>
)

Loading…
Cancel
Save