Fix UI issues at top of confirm page container (#13314)

This commit fixes a few issues with ConfirmPageContainerSummary (which
holds the contract being used or action being performed and the money
being sent):

* Remove fixed height so that the secondary currency doesn't get cut off
  or spill over
* Add missing padding
* Fix font size of primary and secondary currencies
* Add top border when there is a "address not in your address book"
  alert at the top

Co-authored-by: Ariella <ariellavu@gmail.com>
feature/default_network_editable
Elliot Winkler 3 years ago committed by ryanml
parent 1f02a1c12f
commit 66ceeefae3
  1. 8
      ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js
  2. 16
      ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss
  3. 4
      ui/components/app/confirm-page-container/confirm-page-container-content/index.scss
  4. 1
      ui/components/app/confirm-page-container/confirm-page-container.component.js
  5. 2
      ui/pages/confirm-transaction-base/confirm-transaction-base.component.js

@ -43,6 +43,7 @@ export default class ConfirmPageContainerContent extends Component {
rejectNText: PropTypes.string, rejectNText: PropTypes.string,
hideTitle: PropTypes.bool, hideTitle: PropTypes.bool,
supportsEIP1559V2: PropTypes.bool, supportsEIP1559V2: PropTypes.bool,
hasTopBorder: PropTypes.bool,
}; };
renderContent() { renderContent() {
@ -111,6 +112,7 @@ export default class ConfirmPageContainerContent extends Component {
setUserAcknowledgedGasMissing, setUserAcknowledgedGasMissing,
hideUserAcknowledgedGasMissing, hideUserAcknowledgedGasMissing,
supportsEIP1559V2, supportsEIP1559V2,
hasTopBorder,
} = this.props; } = this.props;
const primaryAction = hideUserAcknowledgedGasMissing const primaryAction = hideUserAcknowledgedGasMissing
@ -121,7 +123,11 @@ export default class ConfirmPageContainerContent extends Component {
}; };
return ( return (
<div className="confirm-page-container-content"> <div
className={classnames('confirm-page-container-content', {
'confirm-page-container-content--with-top-border': hasTopBorder,
})}
>
{warning ? <ConfirmPageContainerWarning warning={warning} /> : null} {warning ? <ConfirmPageContainerWarning warning={warning} /> : null}
{ethGasPriceWarning && ( {ethGasPriceWarning && (
<ConfirmPageContainerWarning warning={ethGasPriceWarning} /> <ConfirmPageContainerWarning warning={ethGasPriceWarning} />

@ -1,16 +1,18 @@
.confirm-page-container-summary { .confirm-page-container-summary {
padding: 0 24px; padding: 16px 24px;
background-color: #f9fafa; background-color: #f9fafa;
height: 120px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-evenly; justify-content: space-evenly;
&__origin,
&__action-row {
padding-bottom: 8px;
}
&__origin { &__origin {
@include H6; @include H6;
padding-bottom: 10px;
} }
&__action-row { &__action-row {
@ -34,7 +36,6 @@
} }
&__title { &__title {
padding: 4px 0;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -45,7 +46,7 @@
} }
&__title-text { &__title-text {
@include H2; @include H1;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -53,13 +54,12 @@
} }
&__subtitle { &__subtitle {
@include H6; @include H5;
color: var(--oslo-gray); color: var(--oslo-gray);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-left: 42px;
} }
&--border { &--border {

@ -8,6 +8,10 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
&--with-top-border {
border-top: 1px solid var(--geyser);
}
&__error-container { &__error-container {
padding: 0 16px 16px 16px; padding: 0 16px 16px 16px;
} }

@ -232,6 +232,7 @@ export default class ConfirmPageContainer extends Component {
ethGasPriceWarning={ethGasPriceWarning} ethGasPriceWarning={ethGasPriceWarning}
hideTitle={hideTitle} hideTitle={hideTitle}
supportsEIP1559V2={supportsEIP1559V2} supportsEIP1559V2={supportsEIP1559V2}
hasTopBorder={showAddToAddressDialog}
/> />
)} )}
{shouldDisplayWarning && ( {shouldDisplayWarning && (

@ -864,7 +864,7 @@ export default class ConfirmTransactionBase extends Component {
value={hexTransactionAmount} value={hexTransactionAmount}
type={PRIMARY} type={PRIMARY}
showEthLogo showEthLogo
ethLogoHeight="36" ethLogoHeight="28"
hideLabel hideLabel
/> />
); );

Loading…
Cancel
Save