Confirm transaction screen - wrap lengthier values (#12733)

feature/default_network_editable
Jyoti Puri 3 years ago committed by GitHub
parent 0431821fca
commit 42fea3d323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/e2e/tests/send-edit.spec.js
  2. 22
      ui/components/app/transaction-detail-item/index.scss
  3. 25
      ui/components/app/transaction-detail-item/transaction-detail-item.component.js

@ -62,7 +62,7 @@ describe('Editing Confirm Transaction', function () {
// has correct updated value on the confirm screen the transaction
const editedTransactionAmounts = await driver.findElements(
'.transaction-detail-item__row .transaction-detail-item__detail-text .currency-display-component__text',
'.transaction-detail-item__row .transaction-detail-item__detail-values .currency-display-component__text:last-of-type',
);
const editedTransactionAmount = editedTransactionAmounts[0];
assert.equal(await editedTransactionAmount.getText(), '0.0008');

@ -5,12 +5,15 @@
&__row {
display: flex;
justify-content: space-between;
grid-gap: 5px;
}
&__title {
flex-grow: 1;
word-break: break-word;
&__detail-values {
display: flex;
flex-wrap: wrap;
justify-content: end;
width: 65%;
}
.info-tooltip {
@ -22,19 +25,6 @@
}
}
&__total {
font-weight: bold;
color: $ui-black;
}
&__subtitle {
flex-grow: 1;
}
&__subtext {
text-align: end;
}
.currency-display-component {
display: inline;
}

@ -23,16 +23,12 @@ export default function TransactionDetailItem({
color={detailTitleColor}
fontWeight={FONT_WEIGHT.BOLD}
variant={TYPOGRAPHY.H6}
className="transaction-detail-item__title"
>
{detailTitle}
</Typography>
<div className="transaction-detail-item__detail-values">
{detailText && (
<Typography
variant={TYPOGRAPHY.H6}
className="transaction-detail-item__detail-text"
color={COLORS.UI4}
>
<Typography variant={TYPOGRAPHY.H6} color={COLORS.UI4}>
{detailText}
</Typography>
)}
@ -40,29 +36,22 @@ export default function TransactionDetailItem({
color={COLORS.BLACK}
fontWeight={FONT_WEIGHT.BOLD}
variant={TYPOGRAPHY.H6}
className="transaction-detail-item__total"
margin={[1, 1]}
>
{detailTotal}
</Typography>
</div>
</div>
<div className="transaction-detail-item__row">
{React.isValidElement(subTitle) ? (
<div className="transaction-detail-item__subtitle">{subTitle}</div>
<div>{subTitle}</div>
) : (
<Typography
variant={TYPOGRAPHY.H7}
className="transaction-detail-item__subtitle"
color={COLORS.UI4}
>
<Typography variant={TYPOGRAPHY.H7} color={COLORS.UI4}>
{subTitle}
</Typography>
)}
<Typography
variant={TYPOGRAPHY.H7}
color={COLORS.UI4}
className="transaction-detail-item__subtext"
>
<Typography variant={TYPOGRAPHY.H7} color={COLORS.UI4} align="end">
{subText}
</Typography>
</div>

Loading…
Cancel
Save