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

issue-18714: Replaced deprecated constants with enum in EthSignModal and HoldToRevealModal Component #19499

Merged
merged 2 commits into from
Jun 8, 2023
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
22 changes: 11 additions & 11 deletions ui/components/app/modals/eth-sign-modal/eth-sign-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import {
} from '../../../component-library';
import {
AlignItems,
DISPLAY,
FLEX_DIRECTION,
Display,
FlexDirection,
IconColor,
JustifyContent,
SEVERITIES,
Severity,
Size,
TextAlign,
TextVariant,
Expand Down Expand Up @@ -63,14 +63,14 @@ const EthSignModal = ({ hideModal }) => {
return (
<Box
className="eth-sign-modal"
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.COLUMN}
display={Display.Flex}
flexDirection={FlexDirection.Column}
justifyContent={JustifyContent.flexStart}
padding={4}
>
<Box
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.ROW}
display={Display.Flex}
flexDirection={FlexDirection.Row}
marginBottom={4}
justifyContent={JustifyContent.center}
>
Expand Down Expand Up @@ -105,7 +105,7 @@ const EthSignModal = ({ hideModal }) => {
{t('learnMoreUpperCase')}
</ButtonLink>
</Text>
<BannerAlert severity={SEVERITIES.DANGER} marginTop={6} marginBottom={6}>
<BannerAlert severity={Severity.Danger} marginTop={6} marginBottom={6}>
{t('toggleEthSignModalBannerText')}
{t('toggleEthSignModalBannerBoldText')}
</BannerAlert>
Expand All @@ -125,7 +125,7 @@ const EthSignModal = ({ hideModal }) => {
/>
) : (
<Box
flexDirection={FLEX_DIRECTION.ROW}
flexDirection={FlexDirection.Row}
alignItems={AlignItems.flexStart}
gap={2}
>
Expand All @@ -146,8 +146,8 @@ const EthSignModal = ({ hideModal }) => {
</Box>
)}
<Box
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.ROW}
display={Display.Flex}
flexDirection={FlexDirection.Row}
justifyContent={JustifyContent.spaceBetween}
gap={4}
marginTop={6}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
} from '../../../component-library';
import {
AlignItems,
DISPLAY,
FLEX_DIRECTION,
Display,
FlexDirection,
JustifyContent,
Size,
TextVariant,
Expand Down Expand Up @@ -58,8 +58,8 @@ const HoldToRevealModal = ({
const renderHoldToRevealPrivateKeyContent = () => {
return (
<Box
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.COLUMN}
display={Display.Flex}
flexDirection={FlexDirection.Column}
gap={4}
marginBottom={6}
>
Expand All @@ -80,7 +80,7 @@ const HoldToRevealModal = ({
key="hold-to-reveal-4"
variant={TextVariant.bodyMd}
as="span"
display={DISPLAY.INLINE}
display={Display.Inline}
>
{t('holdToRevealContent4')}
</Text>,
Expand All @@ -103,8 +103,8 @@ const HoldToRevealModal = ({
const renderHoldToRevealSRPContent = () => {
return (
<Box
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.COLUMN}
display={Display.Flex}
flexDirection={FlexDirection.Column}
gap={4}
marginBottom={6}
>
Expand All @@ -125,7 +125,7 @@ const HoldToRevealModal = ({
key="hold-to-reveal-4"
variant={TextVariant.bodyMd}
as="span"
display={DISPLAY.INLINE}
display={Display.Inline}
>
{t('holdToRevealContent4')}
</Text>,
Expand All @@ -148,14 +148,14 @@ const HoldToRevealModal = ({
return (
<Box
className="hold-to-reveal-modal"
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.COLUMN}
display={Display.Flex}
flexDirection={FlexDirection.Column}
justifyContent={JustifyContent.flexStart}
padding={6}
>
<Box
display={DISPLAY.FLEX}
flexDirection={FLEX_DIRECTION.ROW}
display={Display.Flex}
flexDirection={FlexDirection.Row}
alignItems={AlignItems.center}
justifyContent={JustifyContent.spaceBetween}
marginBottom={6}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import HoldToRevealModal from './hold-to-reveal-modal';

export default {
title: 'Components/App/Modals/HoldToRevealModal',
component: HoldToRevealModal,
};

const Template = (args) => <HoldToRevealModal {...args} />;

export const DefaultStory = Template.bind({});

DefaultStory.storyName = 'Default';