diff --git a/src/components/PrivateAndSecure.module.css b/src/components/PrivateAndSecure.module.css new file mode 100644 index 0000000000..3b5ae3534c --- /dev/null +++ b/src/components/PrivateAndSecure.module.css @@ -0,0 +1,12 @@ +.secureSeal { + align-content: center; + color: var(--mui-palette-text-secondary); + display: flex; + font-size: 13px; + justify-content: center; + padding: var(--spacing-2) 0; +} + +.secureSeal :global(.MuiSvgIcon-root) { + margin-right: var(--spacing-point-5); +} diff --git a/src/components/PrivateAndSecure.tsx b/src/components/PrivateAndSecure.tsx index 9eb61fa536..ed86d68ac0 100644 --- a/src/components/PrivateAndSecure.tsx +++ b/src/components/PrivateAndSecure.tsx @@ -1,25 +1,18 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import React from 'react' -import { useTokens } from '@kyper/tokenprovider' -import { Lock } from '@kyper/icon/Lock' +import { Icon } from '@mxenabled/mxui' import { __ } from 'src/utilities/Intl' +import styles from 'src/components/PrivateAndSecure.module.css' interface PrivateAndSecureProps { style?: object } export const PrivateAndSecure: React.FC = ({ style }) => { - const tokens = useTokens() - const styles = getStyles(tokens) - return ( -
- +
+ { // --TR: This is a "MX" slogan bank level security meaning as safe as banks are able __('Private and secure') @@ -27,17 +20,3 @@ export const PrivateAndSecure: React.FC = ({ style }) =>
) } - -const getStyles = (tokens: any) => ({ - secureSeal: { - alignContent: 'center', - color: tokens.TextColor.InputLabel, - display: 'flex', - fontSize: tokens.FontSize.Small, - justifyContent: 'center', - padding: `${tokens.Spacing.Medium}px 0`, - }, - lock: { - marginRight: tokens.Spacing.Tiny, - }, -}) diff --git a/src/views/disclosure/Disclosure.js b/src/views/disclosure/Disclosure.js index ce68617efe..88d5c78a16 100644 --- a/src/views/disclosure/Disclosure.js +++ b/src/views/disclosure/Disclosure.js @@ -1,16 +1,12 @@ import React, { useRef, useState, Fragment, useImperativeHandle } from 'react' import { useDispatch, useSelector } from 'react-redux' -import { css } from '@mxenabled/cssinjs' -import { useTokens } from '@kyper/tokenprovider' -import { Text } from '@mxenabled/mxui' -import { Lock } from '@kyper/icon/Lock' -import { Link } from '@mui/material' +import { Icon, Text } from '@mxenabled/mxui' +import { Link, Stack } from '@mui/material' import { Button } from '@mui/material' import { ActionTypes } from 'src/redux/actions/Connect' import { selectConnectConfig, selectCurrentMode } from 'src/redux/reducers/configSlice' -import { getSize } from 'src/redux/selectors/Browser' import { PageviewInfo } from 'src/const/Analytics' import useAnalyticsPath from 'src/hooks/useAnalyticsPath' @@ -25,14 +21,11 @@ import { PrivacyPolicy } from 'src/views/disclosure/PrivacyPolicy' import PoweredByMXText from 'src/views/disclosure/PoweredByMXText' import { scrollToTop } from 'src/utilities/ScrollToTop' import { goToUrlLink } from 'src/utilities/global' +import styles from 'src/views/disclosure/Disclosure.module.css' export const Disclosure = React.forwardRef((_, disclosureRef) => { const containerRef = useRef(null) useAnalyticsPath(...PageviewInfo.CONNECT_DISCLOSURE) - const size = useSelector(getSize) - const isSmall = size === 'small' - const tokens = useTokens() - const styles = getStyles(tokens, isSmall) const getNextDelay = getDelay() const [showPrivacyPolicy, setShowPrivacyPolicy] = useState(false) // Redux @@ -74,8 +67,13 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => { -
- + + {_p('connect/disclosure/title', 'Connect your account')} @@ -86,15 +84,15 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => { )} -
    +
      {isInAggMode && ( -
    • +
    • {__('Account details')}
    • -
    • +
    • {__('Account balances and transactions')} @@ -104,12 +102,12 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => { {isInTaxMode && ( -
    • +
    • {__('Basic account information')}
    • -
    • +
    • {__('Tax documents')} @@ -119,12 +117,12 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => { {isInVerifyMode && ( -
    • +
    • {__('Routing and account numbers')}
    • -
    • +
    • {__('Account balances')} @@ -133,13 +131,8 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => { )}
    -
    - +
    + {
    {_p('connect/disclosure/policy/text', 'By clicking Continue, you agree to the ')} { if (showExternalLinkPopup) { @@ -171,15 +165,15 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => { goToUrlLink(privacyUrl, true) } }} - style={styles.link} + variant="caption" > {_p('connect/disclosure/policy/link', 'MX Privacy Policy.')} -
    + -
    + -
    +
    -
    +
    )} @@ -205,59 +199,6 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => { ) }) -const getStyles = (tokens) => { - return { - svg: { - margin: `${tokens.Spacing.Large}px auto 0`, - width: 240, - }, - flexGroup: { - display: 'flex', - flexDirection: 'column', - }, - title: { - margin: `${tokens.Spacing.XLarge}px auto ${tokens.Spacing.Medium}px auto`, - textAlign: 'center', - }, - dataList: { - listStylePosition: 'outside', - marginTop: tokens.Spacing.XSmall, - marginBottom: tokens.Spacing.Small, - marginLeft: tokens.Spacing.XSmall, - }, - listItem: { - color: tokens.TextColor.Default, - marginLeft: tokens.Spacing.Medium, - '& span': { - marginLeft: tokens.Spacing.XTiny, - }, - }, - lockGroup: { - display: 'flex', - }, - lockIcon: { - display: 'block', - marginRight: tokens.Spacing.XSmall, - marginTop: tokens.Spacing.Tiny, - marginLeft: tokens.Spacing.Tiny, - }, - disclaimer: { - textAlign: 'center', - marginTop: tokens.Spacing.XLarge, - marginBottom: tokens.Spacing.Medium, - lineHeight: tokens.LineHeight.Small, - color: tokens.TextColor.Secondary, - }, - link: { - fontSize: tokens.FontSize.XSmall, - display: 'inline', - }, - poweredBy: { - marginTop: tokens.Spacing.Medium, - }, - } -} - Disclosure.displayName = 'Disclosure' export default Disclosure diff --git a/src/views/disclosure/Disclosure.module.css b/src/views/disclosure/Disclosure.module.css new file mode 100644 index 0000000000..55a735676a --- /dev/null +++ b/src/views/disclosure/Disclosure.module.css @@ -0,0 +1,46 @@ +.title:global(.MuiTypography-root) { + margin: var(--spacing-4) auto var(--spacing-2); + text-align: center; +} + +.dataList { + list-style-position: outside; + margin-bottom: var(--spacing-1-point-5); + margin-left: var(--spacing-1); + margin-top: var(--spacing-1); +} + +.listItem { + color: var(--mui-palette-text-primary); + margin-left: var(--spacing-2); +} + +.listItem span { + margin-left: var(--spacing-point-25); +} + +.lockGroup { + display: flex; +} + +.lockGroup :global(.MuiSvgIcon-root) { + margin-left: var(--spacing-point-5); + margin-right: var(--spacing-1); + margin-top: var(--spacing-point-5); +} + +.disclaimer:global(.MuiTypography-root) { + color: var(--mui-palette-text-secondary); + line-height: 16px; + margin-bottom: var(--spacing-2); + margin-top: var(--spacing-4); + text-align: center; +} + +.link:global(.MuiLink-root) { + display: inline; +} + +.poweredBy { + margin-top: var(--spacing-2); +} diff --git a/src/views/disclosure/Interstitial.js b/src/views/disclosure/Interstitial.js index 06b7c707b5..45d56d539d 100644 --- a/src/views/disclosure/Interstitial.js +++ b/src/views/disclosure/Interstitial.js @@ -5,7 +5,6 @@ import PropTypes from 'prop-types' import { useTokens } from '@kyper/tokenprovider' import { Icon, Text } from '@mxenabled/mxui' import { Link as LinkIcon } from '@kyper/icon/Link' -import { Lock } from '@kyper/icon/Lock' import { InfoOutline } from '@kyper/icon/InfoOutline' import { Link, Stack } from '@mui/material' @@ -133,7 +132,7 @@ export const DisclosureInterstitial = React.forwardRef((props, interstitialNavRe - +