From 2118b4825d0df7c84dfa8e551fe056ecc2e7d46a Mon Sep 17 00:00:00 2001 From: George Marshall Date: Fri, 25 Mar 2022 14:01:17 -0700 Subject: [PATCH] Dark mode: updating permissions redirect check icon (#14200) Co-authored-by: David Walsh --- app/images/permissions-check.svg | 15 ------- .../permissions-connect/redirect/index.scss | 42 +++++++++++-------- .../permissions-redirect.component.js | 37 ++++++---------- .../redirect/permissions-redirect.stories.js | 25 +++++++++++ 4 files changed, 63 insertions(+), 56 deletions(-) delete mode 100644 app/images/permissions-check.svg create mode 100644 ui/pages/permissions-connect/redirect/permissions-redirect.stories.js diff --git a/app/images/permissions-check.svg b/app/images/permissions-check.svg deleted file mode 100644 index a45c5346b..000000000 --- a/app/images/permissions-check.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/ui/pages/permissions-connect/redirect/index.scss b/ui/pages/permissions-connect/redirect/index.scss index d7f90930d..57bb9611f 100644 --- a/ui/pages/permissions-connect/redirect/index.scss +++ b/ui/pages/permissions-connect/redirect/index.scss @@ -4,39 +4,47 @@ justify-content: center; &__result { - @include H3; - position: absolute; top: 30%; - flex-direction: column; - justify-content: space-between; - align-items: center; text-align: center; color: var(--color-text-default); } &__icons { display: flex; + position: relative; + max-width: 300px; + width: 100%; + + &::before { + content: ''; + position: absolute; + width: 90%; + left: 5%; + top: 50%; + border: 1px solid var(--color-border-muted); + border-style: dashed; + z-index: -1; + } } - &__center-icon { - @include H7; + .icon-border { + max-width: 64px; + flex: 0 0 64px; + } - display: flex; + &__line { position: relative; - justify-content: center; + display: flex; align-items: center; + justify-content: center; } &__check { - display: flex; - align-items: center; - justify-content: center; + color: var(--color-success-default); border-radius: 50%; - width: 40px; - height: 40px; - color: var(--color-success-inverse); - background-color: var(--color-success-default); - position: absolute; + background-color: var(--color-background-default); + margin-left: 40px; + margin-right: 40px; } } diff --git a/ui/pages/permissions-connect/redirect/permissions-redirect.component.js b/ui/pages/permissions-connect/redirect/permissions-redirect.component.js index d50a8631d..6f478e813 100644 --- a/ui/pages/permissions-connect/redirect/permissions-redirect.component.js +++ b/ui/pages/permissions-connect/redirect/permissions-redirect.component.js @@ -1,6 +1,8 @@ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import SiteIcon from '../../../components/ui/site-icon'; +import Typography from '../../../components/ui/typography/typography'; +import { TYPOGRAPHY } from '../../../helpers/constants/design-system'; import { I18nContext } from '../../../contexts/i18n'; export default function PermissionsRedirect({ subjectMetadata }) { @@ -9,41 +11,28 @@ export default function PermissionsRedirect({ subjectMetadata }) { return (
- {t('connecting')} + + {t('connecting')} +
-
- - {renderBrokenLine()} +
+
- +
); - - function renderBrokenLine() { - return ( - - - - ); - } } PermissionsRedirect.propTypes = { diff --git a/ui/pages/permissions-connect/redirect/permissions-redirect.stories.js b/ui/pages/permissions-connect/redirect/permissions-redirect.stories.js new file mode 100644 index 000000000..ed952082d --- /dev/null +++ b/ui/pages/permissions-connect/redirect/permissions-redirect.stories.js @@ -0,0 +1,25 @@ +import React from 'react'; +import PermissionsRedirect from '.'; + +export default { + title: 'Components/Pages/PermissionsConnect/Redirect/PermissionsRedirect', + id: __filename, + argTypes: { + subjectMetadata: { + control: 'object', + }, + }, + args: { + subjectMetadata: { + extensionId: 'extensionId', + iconUrl: 'https://airswap-token-images.s3.amazonaws.com/SNX.png', + subjectType: 'subjectType', + name: 'name', + origin: 'origin', + }, + }, +}; + +export const DefaultStory = (args) => ; + +DefaultStory.storyName = 'Default';