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

Part of #18714: Replace deprecated design system typography consts with enums #19041

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ui/components/app/confirm-data/confirm-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useSelector } from 'react-redux';
import {
Color,
TextVariant,
TEXT_TRANSFORM,
TextTransform,
} from '../../../helpers/constants/design-system';
import { getKnownMethodData } from '../../../selectors';
import { useI18nContext } from '../../../hooks/useI18nContext';
Expand Down Expand Up @@ -42,7 +42,7 @@ const ConfirmData = ({ txData, dataComponent }) => {
<Box paddingBottom={3} paddingTop={2}>
<Text
as="span"
textTransform={TEXT_TRANSFORM.UPPERCASE}
textTransform={TextTransform.Uppercase}
variant={TextVariant.bodySm}
>
{`${t('functionType')}:`}
Expand All @@ -51,7 +51,7 @@ const ConfirmData = ({ txData, dataComponent }) => {
as="span"
color={Color.textDefault}
paddingLeft={1}
textTransform={TEXT_TRANSFORM.CAPITALIZE}
textTransform={TextTransform.Capitalize}
variant={TextVariant.bodySmBold}
>
{`${functionType} ${functionParams}`}
Expand Down
16 changes: 8 additions & 8 deletions ui/components/app/confirm-hexdata/confirm-hexdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
import { useTransactionFunctionType } from '../../../hooks/useTransactionFunctionType';
import {
Color,
OVERFLOW_WRAP,
OverflowWrap,
TextVariant,
TEXT_TRANSFORM,
TextTransform,
} from '../../../helpers/constants/design-system';
import Box from '../../ui/box';
import { Text } from '../../component-library';
Expand Down Expand Up @@ -42,7 +42,7 @@ const ConfirmHexData = ({ txData, dataHexComponent }) => {
<Box paddingBottom={3} paddingTop={2}>
<Text
as="span"
textTransform={TEXT_TRANSFORM.UPPERCASE}
textTransform={TextTransform.Uppercase}
variant={TextVariant.bodySm}
>
{`${t('functionType')}:`}
Expand All @@ -51,7 +51,7 @@ const ConfirmHexData = ({ txData, dataHexComponent }) => {
as="span"
color={Color.textDefault}
paddingLeft={1}
textTransform={TEXT_TRANSFORM.CAPITALIZE}
textTransform={TextTransform.Capitalize}
variant={TextVariant.bodySmBold}
>
{`${functionType} ${functionParams}`}
Expand All @@ -63,13 +63,13 @@ const ConfirmHexData = ({ txData, dataHexComponent }) => {
as="h3"
paddingBottom={3}
paddingTop={2}
textTransform={TEXT_TRANSFORM.UPPERCASE}
textTransform={TextTransform.Uppercase}
variant={TextVariant.bodySm}
>
{`${t('parameters')}:`}
</Text>
<Text
overflowWrap={OVERFLOW_WRAP.BREAK_WORD}
overflowWrap={OverflowWrap.BreakWord}
variant={TextVariant.bodySm}
>
<pre>{JSON.stringify(params, null, 2)}</pre>
Expand All @@ -80,14 +80,14 @@ const ConfirmHexData = ({ txData, dataHexComponent }) => {
as="h3"
paddingBottom={3}
paddingTop={2}
textTransform={TEXT_TRANSFORM.UPPERCASE}
textTransform={TextTransform.Uppercase}
variant={TextVariant.bodySm}
>
{`${t('hexData')}: ${toBuffer(txParams?.data).length} bytes`}
</Text>
<Text
backgroundColor={Color.backgroundAlternative}
overflowWrap={OVERFLOW_WRAP.BREAK_WORD}
overflowWrap={OverflowWrap.BreakWord}
padding={4}
variant={TextVariant.bodySm}
>
Expand Down