import React, { Component } from 'react'
import PropTypes from 'prop-types'
import PageContainer from '../../page-container'
import { Tabs, Tab } from '../../tabs'
import AdvancedTabContent from './advanced-tab-content'
import BasicTabContent from './basic-tab-content'
export default class GasModalPageContainer extends Component {
static contextTypes = {
t: PropTypes.func,
}
static propTypes = {
hideModal: PropTypes.func,
updateCustomGasPrice: PropTypes.func,
updateCustomGasLimit: PropTypes.func,
customGasPrice: PropTypes.number,
customGasLimit: PropTypes.number,
gasPriceButtonGroupProps: PropTypes.object,
}
state = {}
renderBasicTabContent () {
return (
)
}
renderAdvancedTabContent = () => {
const {
updateCustomGasPrice,
updateCustomGasLimit,
customGasPrice,
customGasLimit,
} = this.props
return (
)
}
renderInfoRow (className, totalLabelKey, fiatTotal, cryptoTotal) {
return (
{`${this.context.t(totalLabelKey)}:`}
{fiatTotal}
{`${this.context.t('amountPlusTxFee')}`}
{cryptoTotal}
)
}
renderTabContent (mainTabContent) {
return (
{ mainTabContent }
{ this.renderInfoRow('gas-modal-content__info-row--fade', 'originalTotal', '$20.02 USD', '0.06685 ETH') }
{ this.renderInfoRow('gas-modal-content__info-row', 'newTotal', '$20.02 USD', '0.06685 ETH') }
)
}
renderTabs () {
return (
{ this.renderTabContent(this.renderBasicTabContent()) }
{ this.renderTabContent(this.renderAdvancedTabContent()) }
)
}
render () {
const { hideModal } = this.props
return (
hideModal()}
onClose={() => hideModal()}
/>
)
}
}