From ab1b4c3a317d3fd81cb7770a000853b4349ac29d Mon Sep 17 00:00:00 2001 From: Harsh Shukla <125105825+PrgrmrHarshShukla@users.noreply.github.com> Date: Tue, 25 Jul 2023 02:08:17 +0530 Subject: [PATCH] Part of #17670 for: accreditation.component.js (#20057) * Part of #17670 for: accreditation.component.js * Update checkbox.test.tsx.snap * Update ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js Co-authored-by: George Marshall * Update accreditation.component.js * Update ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js Co-authored-by: George Marshall * Updating component to use component library components and removing unused CSS --------- Co-authored-by: George Marshall Co-authored-by: georgewrmarshall --- .../accrediation.component.stories.js | 1 + .../accreditation/accreditation.component.js | 78 +++++++++---------- .../components/ui/accreditation/index.scss | 24 ------ .../app/transaction-decoding/index.scss | 1 - 4 files changed, 40 insertions(+), 64 deletions(-) delete mode 100644 ui/components/app/transaction-decoding/components/ui/accreditation/index.scss diff --git a/ui/components/app/transaction-decoding/components/ui/accreditation/accrediation.component.stories.js b/ui/components/app/transaction-decoding/components/ui/accreditation/accrediation.component.stories.js index 5eb2e730d..c9df36cb4 100644 --- a/ui/components/app/transaction-decoding/components/ui/accreditation/accrediation.component.stories.js +++ b/ui/components/app/transaction-decoding/components/ui/accreditation/accrediation.component.stories.js @@ -11,6 +11,7 @@ export default { address: { control: 'string' }, }, args: { + fetchVia: 'fetchVia', address: '0x6b175474e89094c44da98b954eedeac495271d0f', }, }; diff --git a/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js b/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js index cf0f40073..62e5a0a00 100644 --- a/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js +++ b/ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js @@ -8,11 +8,22 @@ import { } from '../../../../../../selectors'; import { I18nContext } from '../../../../../../contexts/i18n'; -import { TypographyVariant } from '../../../../../../helpers/constants/design-system'; - -import Button from '../../../../../ui/button'; -import Typography from '../../../../../ui/typography'; -import { Icon, IconName } from '../../../../../component-library'; +import { + BUTTON_VARIANT, + Button, + Icon, + IconName, + Text, + Box, + BUTTON_SIZES, +} from '../../../../../component-library'; +import { + AlignItems, + Display, + TextVariant, + FlexDirection, + FlexWrap, +} from '../../../../../../helpers/constants/design-system'; const Accreditation = ({ fetchVia, address }) => { const t = useContext(I18nContext); @@ -20,48 +31,37 @@ const Accreditation = ({ fetchVia, address }) => { const rpcPrefs = useSelector(getRpcPrefsForCurrentProvider); const addressLink = getAccountLink(address, chainId, rpcPrefs); - const AccreditationLink = () => { - return ( - <> - + return ( + + + + {t('transactionDecodingAccreditationVerified', [ , ])} - - + + {t('transactionDecodingAccreditationDecoded')} - - - ); - }; - - return ( -
-
- -
-
- -
-
+ + + ); }; diff --git a/ui/components/app/transaction-decoding/components/ui/accreditation/index.scss b/ui/components/app/transaction-decoding/components/ui/accreditation/index.scss deleted file mode 100644 index e71dfcdf3..000000000 --- a/ui/components/app/transaction-decoding/components/ui/accreditation/index.scss +++ /dev/null @@ -1,24 +0,0 @@ -.accreditation { - display: flex; - align-items: center; - margin-top: 8px; - - &__icon { - margin-right: 8px; - } - - &__info { - color: var(--color-text-default); - display: flex; - flex-flow: column; - flex-wrap: wrap; - } - - &__link.btn-link { - @include H7; - - display: inherit; - padding: 0 4px; - } -} - diff --git a/ui/components/app/transaction-decoding/index.scss b/ui/components/app/transaction-decoding/index.scss index e1da1080e..ac822449f 100644 --- a/ui/components/app/transaction-decoding/index.scss +++ b/ui/components/app/transaction-decoding/index.scss @@ -1,6 +1,5 @@ //styling for ui components @import './components/ui/copy-raw-data/index'; -@import './components/ui/accreditation/index'; //styling for decoding components @import './components/decoding/address/index';