From 674bb131b2c349581bf765a772fc050ec0d84ecd Mon Sep 17 00:00:00 2001 From: Dhruv <79097544+dhruvv173@users.noreply.github.com> Date: Wed, 19 Jul 2023 15:08:06 +0530 Subject: [PATCH] Part of #18714: Replacing deprecated constants (#20003) * replacing deprecated constants * updating Box in player.js * created story for Player.js --- .../qr-hardware-sign-request/player.js | 11 ++++--- .../player.stories.js | 29 +++++++++++++++++++ .../signature-request-siwe-icon/index.js | 7 ++--- .../signature-request-siwe-tag/index.js | 4 +-- ui/components/app/tab-bar/tab-bar.js | 7 ++--- 5 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 ui/components/app/qr-hardware-popover/qr-hardware-sign-request/player.stories.js diff --git a/ui/components/app/qr-hardware-popover/qr-hardware-sign-request/player.js b/ui/components/app/qr-hardware-popover/qr-hardware-sign-request/player.js index 9dfdbf732..fcd03f7b7 100644 --- a/ui/components/app/qr-hardware-popover/qr-hardware-sign-request/player.js +++ b/ui/components/app/qr-hardware-popover/qr-hardware-sign-request/player.js @@ -2,16 +2,15 @@ import React, { useEffect, useMemo, useState } from 'react'; import QRCode from 'qrcode.react'; import { UR, UREncoder } from '@ngraveio/bc-ur'; import PropTypes from 'prop-types'; -import Box from '../../../ui/box'; import { useI18nContext } from '../../../../hooks/useI18nContext'; import { AlignItems, - DISPLAY, - FLEX_DIRECTION, + Display, + FlexDirection, TextAlign, } from '../../../../helpers/constants/design-system'; import { PageContainerFooter } from '../../../ui/page-container'; -import { Text } from '../../../component-library/text/deprecated'; +import { Text, Box } from '../../../component-library'; const Player = ({ type, cbor, cancelQRHardwareSignRequest, toRead }) => { const t = useI18nContext(); @@ -39,9 +38,9 @@ const Player = ({ type, cbor, cancelQRHardwareSignRequest, toRead }) => {
; + +DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/signature-request-siwe/signature-request-siwe-icon/index.js b/ui/components/app/signature-request-siwe/signature-request-siwe-icon/index.js index ef85b2e6b..f59e36ddd 100644 --- a/ui/components/app/signature-request-siwe/signature-request-siwe-icon/index.js +++ b/ui/components/app/signature-request-siwe/signature-request-siwe-icon/index.js @@ -1,18 +1,17 @@ import React from 'react'; import { - DISPLAY, + Display, AlignItems, Color, JustifyContent, } from '../../../../helpers/constants/design-system'; -import Box from '../../../ui/box'; -import { Icon, IconName } from '../../../component-library'; +import { Icon, IconName, Box } from '../../../component-library'; const SignatureRequestSIWEIcon = () => { return ( { { @@ -33,7 +32,7 @@ const TabBar = (props) => { className="tab-bar__tab__selected-indicator" borderRadius={BorderRadius.pill} backgroundColor={Color.primaryDefault} - display={[DISPLAY.NONE, DISPLAY.BLOCK]} + display={[Display.None, Display.Block]} /> )}