Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace deprecated mixins with text component in transaction-confirmed #25551

Merged
merged 9 commits into from
Aug 1, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ exports[`Transaction Confirmed should match snapshot 1`] = `
class="mm-box mm-icon mm-icon--size-xl mm-box--display-inline-block mm-box--color-success-default"
style="mask-image: url('./images/icons/check.svg');"
/>
<div
class="transaction-confirmed__title"
<h3
class="mm-box mm-text mm-text--heading-md mm-text--font-weight-medium mm-text--text-align-center mm-box--color-text-default"
>
[confirmed]!
</div>
<div
class="transaction-confirmed__description"
</h3>
<p
class="mm-box mm-text mm-text--body-md mm-text--text-align-center mm-box--color-text-default"
>
[initialTransactionConfirmed]
</div>
</p>
</div>
</div>
<div
Expand Down
14 changes: 0 additions & 14 deletions ui/components/app/modals/transaction-confirmed/index.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
@use "design-system";

.transaction-confirmed {
&__title {
@include design-system.H3;

font-weight: 500;
padding: 16px 0;
text-align: center;
}

&__description {
@include design-system.H6;

text-align: center;
}

&__content {
overflow-y: auto;
flex: 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Modal from '../../modal';
import { Icon, IconName, IconSize } from '../../../component-library';
import { IconColor } from '../../../../helpers/constants/design-system';
import { Icon, IconName, IconSize, Text } from '../../../component-library';
import {
IconColor,
TextVariant,
TextAlign,
FontWeight,
} from '../../../../helpers/constants/design-system';

export default class TransactionConfirmed extends PureComponent {
static contextTypes = {
Expand Down Expand Up @@ -35,12 +40,16 @@ export default class TransactionConfirmed extends PureComponent {
color={IconColor.successDefault}
size={IconSize.Xl}
/>
<div className="transaction-confirmed__title">
<Text
variant={TextVariant.headingMd}
fontWeight={FontWeight.Medium}
textAlign={TextAlign.Center}
>
{`${t('confirmed')}!`}
</div>
<div className="transaction-confirmed__description">
</Text>
<Text textAlign={TextAlign.Center}>
{t('initialTransactionConfirmed')}
</div>
</Text>
</div>
</Modal>
);
Expand Down