mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Improvements to propdefaults in button-group.component and basic-tab-content.component
This commit is contained in:
parent
0a7dfcd55d
commit
d07d40cf7c
@ -14,12 +14,13 @@ export default class ButtonGroup extends PureComponent {
|
|||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
className: 'button-group',
|
className: 'button-group',
|
||||||
|
defaultActiveButtonIndex: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
activeButtonIndex: this.props.noButtonActiveByDefault
|
activeButtonIndex: this.props.noButtonActiveByDefault
|
||||||
? null
|
? null
|
||||||
: this.props.defaultActiveButtonIndex || 0,
|
: this.props.defaultActiveButtonIndex,
|
||||||
}
|
}
|
||||||
|
|
||||||
handleButtonClick (activeButtonIndex) {
|
handleButtonClick (activeButtonIndex) {
|
||||||
|
@ -16,11 +16,11 @@ export default class BasicTabContent extends Component {
|
|||||||
<div className="basic-tab-content">
|
<div className="basic-tab-content">
|
||||||
<div className="basic-tab-content__title">Suggest gas fee increases</div>
|
<div className="basic-tab-content__title">Suggest gas fee increases</div>
|
||||||
<GasPriceButtonGroup
|
<GasPriceButtonGroup
|
||||||
{...this.props.gasPriceButtonGroupProps}
|
|
||||||
className="gas-price-button-group"
|
className="gas-price-button-group"
|
||||||
noButtonActiveByDefault={true}
|
noButtonActiveByDefault={true}
|
||||||
showCheck={true}
|
showCheck={true}
|
||||||
handleGasPriceSelection={(newPrice) => console.log('New Price:', newPrice)}
|
handleGasPriceSelection={(newPrice) => console.log('New Price:', newPrice)}
|
||||||
|
{...this.props.gasPriceButtonGroupProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user