From 821888effdf19aab2665f42e7995d4dd8117c04d Mon Sep 17 00:00:00 2001 From: Dhruv <79097544+dhruvv173@users.noreply.github.com> Date: Wed, 19 Jul 2023 15:06:21 +0530 Subject: [PATCH] replacing deprecated constants and components (#20070) --- .../signature-request-original-warning.js | 46 +++++++++---------- ...nature-request-original-warning.stories.js | 31 +++++++++++++ 2 files changed, 52 insertions(+), 25 deletions(-) create mode 100644 ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.stories.js diff --git a/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js b/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js index 13ac14b76..c792ddb38 100644 --- a/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js +++ b/ui/components/app/signature-request-original/signature-request-original-warning/signature-request-original-warning.js @@ -3,21 +3,18 @@ import PropTypes from 'prop-types'; import { useI18nContext } from '../../../../hooks/useI18nContext'; import Popover from '../../../ui/popover'; -import Box from '../../../ui/box'; -import Button from '../../../ui/button'; -import Typography from '../../../ui/typography'; import { IconColor, - DISPLAY, - FLEX_DIRECTION, - FONT_WEIGHT, + Display, + FlexDirection, + FontWeight, JustifyContent, TextColor, - TypographyVariant, + TextVariant, } from '../../../../helpers/constants/design-system'; import Identicon from '../../../ui/identicon'; import { shortenAddress } from '../../../../helpers/utils/util'; -import { Icon, IconName } from '../../../component-library'; +import { Icon, IconName, Box, Text, Button } from '../../../component-library'; const SignatureRequestOriginalWarning = ({ senderAddress, @@ -30,8 +27,8 @@ const SignatureRequestOriginalWarning = ({ return ( @@ -40,37 +37,36 @@ const SignatureRequestOriginalWarning = ({ color={IconColor.errorDefault} className="signature-request-warning__content__header__warning-icon" /> - + {t('yourFundsMayBeAtRisk')} - + - + - {name} {` (${shortenAddress(senderAddress)})`} - + - {t('signatureRequestWarning', [ , ])} - + ( + +); + +DefaultStory.storyName = 'Default';