diff --git a/packages/wallets/src/features/cashier/WalletCashier.scss b/packages/wallets/src/features/cashier/WalletCashier.scss index dd2bab0288e2..f865612649d3 100644 --- a/packages/wallets/src/features/cashier/WalletCashier.scss +++ b/packages/wallets/src/features/cashier/WalletCashier.scss @@ -1,3 +1,9 @@ +.wallets-cashier { + display: flex; + flex-direction: column; + height: calc(100svh - 4rem); +} + .wallets-cashier-content { padding: 2.4rem 2.4rem 0px; display: flex; @@ -5,6 +11,7 @@ justify-content: center; flex: 1; background-color: #ffffff; + overflow: scroll; @include mobile { padding: 1.6rem; diff --git a/packages/wallets/src/features/cashier/WalletCashier.tsx b/packages/wallets/src/features/cashier/WalletCashier.tsx index aa21f66af3b4..50671df0b595 100644 --- a/packages/wallets/src/features/cashier/WalletCashier.tsx +++ b/packages/wallets/src/features/cashier/WalletCashier.tsx @@ -1,20 +1,26 @@ -import React from 'react'; +import React, { useState } from 'react'; import { useActiveWalletAccount } from '@deriv/api'; import { WalletCashierContent, WalletCashierHeader } from './components'; import './WalletCashier.scss'; const WalletCashier = () => { const { isLoading } = useActiveWalletAccount(); + const [isContentScrolled, setIsContentScrolled] = useState(false); + + const onContentScroll = (e: React.UIEvent) => { + const target = e.target as HTMLDivElement; + setIsContentScrolled(target.scrollTop > 0); + }; if (isLoading) return

Loading...

; return ( - <> - -
+
+ +
- +
); }; diff --git a/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.scss b/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.scss index c2cc4899adf9..7d52cadd833a 100644 --- a/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.scss +++ b/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.scss @@ -6,10 +6,12 @@ display: flex; flex-direction: column; justify-content: space-between; + gap: 1.6rem; @include mobile { - padding-top: 1.6rem; - height: 12.2rem; + padding-top: 0rem; + transition: height 0.2s ease-in; + height: fit-content; } &__close-button { @@ -24,7 +26,7 @@ padding-inline: 2.4rem; @include mobile { - padding-inline: 1.6rem; + padding: 1.6rem 1.6rem 0rem; } &__top-left { @@ -38,6 +40,9 @@ align-items: center; @include mobile { + visibility: visible; + transition: visibility 0s, height 0.2s ease; + height: 2rem; gap: 0.8rem; } @@ -68,6 +73,12 @@ @include mobile { gap: 0.8rem; } + + &__icon { + @include mobile { + transition: visibility 0s, height 0.2s ease; + } + } } } @@ -114,3 +125,8 @@ } } } + +.wallets-hide-details { + height: 0; + visibility: hidden; +} diff --git a/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.tsx b/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.tsx index f30776c4808c..5d3fd0a9747b 100644 --- a/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.tsx +++ b/packages/wallets/src/features/cashier/components/WalletCashierHeader/WalletCashierHeader.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { useHistory, useLocation } from 'react-router-dom'; +import classNames from 'classnames'; import { useActiveWalletAccount } from '@deriv/api'; import { WalletCardIcon } from '../../../../components/WalletCardIcon'; import { WalletGradientBackground } from '../../../../components/WalletGradientBackground'; @@ -11,7 +12,7 @@ import './WalletCashierHeader.scss'; const realAccountTabs = ['deposit', 'withdraw', 'transfer', 'transactions']; const virtualAccountTabs = ['withdraw', 'transfer', 'transactions', 'reset-balance']; -const WalletCashierHeader = () => { +const WalletCashierHeader = ({ hideWalletDetails }: { hideWalletDetails: boolean }) => { const { data } = useActiveWalletAccount(); const { isMobile } = useDevice(); const history = useHistory(); @@ -32,7 +33,11 @@ const WalletCashierHeader = () => {
-
+

{data?.currency} Wallet

@@ -43,7 +48,15 @@ const WalletCashierHeader = () => {

{data?.display_balance}

- {data?.wallet_currency_type && } + {data?.wallet_currency_type && ( +
+ +
+ )}