mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
EIP 1559 - Provide a GWEI label for advanced gas control fields (#11419)
This commit is contained in:
parent
64644ad380
commit
310531eeb6
@ -16,6 +16,7 @@ import InfoTooltip from '../../ui/info-tooltip/info-tooltip';
|
|||||||
|
|
||||||
export default function AdvancedGasControlsRow({
|
export default function AdvancedGasControlsRow({
|
||||||
titleText,
|
titleText,
|
||||||
|
titleUnit,
|
||||||
tooltipText,
|
tooltipText,
|
||||||
titleDetailText,
|
titleDetailText,
|
||||||
error,
|
error,
|
||||||
@ -39,7 +40,14 @@ export default function AdvancedGasControlsRow({
|
|||||||
>
|
>
|
||||||
{titleText}
|
{titleText}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
tag={TYPOGRAPHY.H6}
|
||||||
|
variant={TYPOGRAPHY.H6}
|
||||||
|
color={COLORS.UI4}
|
||||||
|
boxProps={{ display: DISPLAY.INLINE_BLOCK }}
|
||||||
|
>
|
||||||
|
{titleUnit}
|
||||||
|
</Typography>
|
||||||
<InfoTooltip position="top" contentText={tooltipText} />
|
<InfoTooltip position="top" contentText={tooltipText} />
|
||||||
</div>
|
</div>
|
||||||
{titleDetailText && (
|
{titleDetailText && (
|
||||||
@ -70,6 +78,7 @@ export default function AdvancedGasControlsRow({
|
|||||||
|
|
||||||
AdvancedGasControlsRow.propTypes = {
|
AdvancedGasControlsRow.propTypes = {
|
||||||
titleText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
titleText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||||
|
titleUnit: PropTypes.string,
|
||||||
tooltipText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
tooltipText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||||
titleDetailText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
titleDetailText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
||||||
error: PropTypes.string,
|
error: PropTypes.string,
|
||||||
@ -79,6 +88,7 @@ AdvancedGasControlsRow.propTypes = {
|
|||||||
|
|
||||||
AdvancedGasControlsRow.defaultProps = {
|
AdvancedGasControlsRow.defaultProps = {
|
||||||
titleText: '',
|
titleText: '',
|
||||||
|
titleUnit: '',
|
||||||
tooltipText: '',
|
tooltipText: '',
|
||||||
titleDetailText: '',
|
titleDetailText: '',
|
||||||
error: '',
|
error: '',
|
||||||
|
@ -32,6 +32,7 @@ export default function AdvancedGasControls() {
|
|||||||
<>
|
<>
|
||||||
<AdvancedGasControlsRow
|
<AdvancedGasControlsRow
|
||||||
titleText={t('maxPriorityFee')}
|
titleText={t('maxPriorityFee')}
|
||||||
|
titleUnit="(GWEI)"
|
||||||
tooltipText=""
|
tooltipText=""
|
||||||
onChange={setMaxPriorityFee}
|
onChange={setMaxPriorityFee}
|
||||||
value={maxPriorityFee}
|
value={maxPriorityFee}
|
||||||
@ -55,6 +56,7 @@ export default function AdvancedGasControls() {
|
|||||||
/>
|
/>
|
||||||
<AdvancedGasControlsRow
|
<AdvancedGasControlsRow
|
||||||
titleText={t('maxFee')}
|
titleText={t('maxFee')}
|
||||||
|
titleUnit="(GWEI)"
|
||||||
tooltipText=""
|
tooltipText=""
|
||||||
onChange={setMaxFee}
|
onChange={setMaxFee}
|
||||||
value={maxFee}
|
value={maxFee}
|
||||||
@ -81,6 +83,7 @@ export default function AdvancedGasControls() {
|
|||||||
<>
|
<>
|
||||||
<AdvancedGasControlsRow
|
<AdvancedGasControlsRow
|
||||||
titleText={t('gasPrice')}
|
titleText={t('gasPrice')}
|
||||||
|
titleUnit="(GWEI)"
|
||||||
onChange={setGasPrice}
|
onChange={setGasPrice}
|
||||||
tooltipText=""
|
tooltipText=""
|
||||||
titleDetailText=""
|
titleDetailText=""
|
||||||
|
Loading…
Reference in New Issue
Block a user