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 typography with text component in signature request original component #25300

Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ exports[`SignatureRequestOriginal should match snapshot 1`] = `
</div>
</div>
<h3
class="box box--margin-top-1 box--margin-bottom-1 box--flex-direction-row typography request-signature__content__title typography--h3 typography--weight-bold typography--style-normal typography--color-text-default"
class="mm-box mm-text request-signature__content__title mm-text--heading-md mm-box--color-text-default"
>
Signature request
</h3>
<h6
class="box box--margin-12 box--margin-top-3 box--margin-bottom-1 box--flex-direction-row typography request-signature__content__subtitle typography--h7 typography--weight-normal typography--style-normal typography--align-center typography--color-text-alternative"
<p
class="mm-box mm-text request-signature__content__subtitle mm-text--body-xs mm-text--text-align-center mm-box--margin-12 mm-box--margin-top-3 mm-box--color-text-alternative"
>
Only sign this message if you fully understand the content and trust the requesting site.
</h6>
</p>
<div
class="request-signature__notice"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,26 @@ import {
} from '../../../../helpers/utils/util';
import { isSuspiciousResponse } from '../../../../../shared/modules/security-provider.utils';
import SiteOrigin from '../../../../components/ui/site-origin';
import Typography from '../../../../components/ui/typography/typography';
import { PageContainerFooter } from '../../../../components/ui/page-container';
import {
TypographyVariant,
FontWeight,
TextAlign,
TextColor,
Size,
TextVariant,
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
IconColor,
Display,
BlockSize,
TextVariant,
BackgroundColor,
///: END:ONLY_INCLUDE_IF
} from '../../../../helpers/constants/design-system';
import {
ButtonLink,
Text,
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
Box,
Icon,
IconName,
Comment on lines +34 to 38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be respecting environment tags ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) and order of imports. Place the Text component import back inside of the ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) tag

Suggested change
Text,
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
Box,
Icon,
IconName,
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
Box,
Icon,
IconName,
Text,

Text,
Devin-Apps marked this conversation as resolved.
Show resolved Hide resolved
///: END:ONLY_INCLUDE_IF
} from '../../../../components/component-library';

Expand Down Expand Up @@ -202,23 +199,22 @@ export default class SignatureRequestOriginal extends Component {
)
}
</div>
<Typography
<Text
className="request-signature__content__title"
variant={TypographyVariant.H3}
fontWeight={FontWeight.Bold}
variant={TextVariant.headingMd}
>
{this.context.t('sigRequest')}
</Typography>
<Typography
</Text>
<Text
className="request-signature__content__subtitle"
variant={TypographyVariant.H7}
variant={TextVariant.bodyXs}
color={TextColor.textAlternative}
align={TextAlign.Center}
textAlign={TextAlign.Center}
margin={12}
marginTop={3}
>
{this.context.t('signatureRequestGuidance')}
</Typography>
</Text>
<div className={classnames('request-signature__notice')}>{notice}</div>
<div className="request-signature__rows">
{rows.map(({ name, value }, index) => {
Expand Down
Loading