diff --git a/packages/appstore/src/components/cfds-listing/cfds-listing.scss b/packages/appstore/src/components/cfds-listing/cfds-listing.scss index 51a2195d4a8e..d1f5df1b1f0d 100644 --- a/packages/appstore/src/components/cfds-listing/cfds-listing.scss +++ b/packages/appstore/src/components/cfds-listing/cfds-listing.scss @@ -1,14 +1,32 @@ .jurisdiction-modal { + &__title { + display: flex; + gap: 1.6rem; + align-items: center; + margin: 0 1rem; + + &-back { + display: flex; + align-items: center; + cursor: pointer; + } + } &__content-wrapper { display: flex; flex-direction: column; @include desktop { overflow: auto; } + width: 100%; + position: absolute; + backface-visibility: hidden; + transition: transform 0.6s ease; + transform: rotateY(0deg); } &__scrollable-content { @include desktop { overflow: auto; + height: 69rem; } } &__footer-content { @@ -26,6 +44,38 @@ bottom: 0; } } + + &__wrapper { + height: 76rem; + perspective: 100rem; + overflow: scroll; + + @include mobile { + height: calc(100vh - 4rem); + } + } + + &__flipped { + @include desktop { + height: 70rem; + } + + .jurisdiction-modal { + &__scrollable-content { + height: 80rem; + } + + &__content-wrapper { + height: 70rem; + transform: rotateY(-180deg); + visibility: hidden; + } + } + + .dynamic-leverage-modal { + transform: rotateY(0deg); + } + } } .cfd-jurisdiction-card--synthetic, @@ -91,6 +141,8 @@ } } &-footer { + position: absolute; + bottom: 0; width: 100%; &-text { background: var(--brand-secondary); @@ -136,6 +188,7 @@ &__footnotes-container { display: flex; flex-direction: column; + justify-content: center; gap: 1rem; margin: 1rem; @include desktop { @@ -205,7 +258,7 @@ min-height: 48rem; } &.financial { - min-height: 54rem; + min-height: 55rem; } @include mobile { height: 48rem; @@ -678,6 +731,87 @@ } } +.dynamic-leverage-modal { + display: flex; + flex-direction: column; + gap: 2.4rem; + margin: 1.5rem 12.8rem 10rem; + position: absolute; + backface-visibility: hidden; + transition: transform 0.6s ease; + transform: rotateY(180deg); + + @include mobile { + margin: 1.5rem 2.4rem 2.4rem; + } + + &__content { + display: grid; + gap: 2.4rem; + grid-template-columns: 1fr 1fr; + margin: 0 10rem; + + @include mobile { + grid-template-columns: 1fr; + margin: 0 6.5rem; + } + } + + &__market { + border: 0.5px solid var(--border-hover); + border-radius: $BORDER_RADIUS * 2; + overflow: hidden; + background-color: var(--general-hover); + height: 24.8rem; + + &-description { + font-style: italic; + } + + &-table { + padding-bottom: 1rem; + + &-header { + &-cell { + display: flex; + flex-direction: column; + } + + &-row { + grid-template-columns: 1fr 0.5fr 1.25fr; + justify-items: center; + border-bottom: 0; + padding: 0.4rem 0; + background-color: var(--general-hover); + } + } + + &-row { + grid-template-columns: 1fr 0.5fr 1.25fr; + justify-items: center; + border-bottom: 0; + padding: 0.4rem 0; + + &:nth-child(even) { + background-color: var(--general-hover); + } + + &:nth-child(odd) { + background-color: var(--general-section-1); + } + } + } + + &-title { + display: flex; + flex-direction: column; + height: 7rem; + padding-top: 1rem; + background-color: var(--general-section-1); + } + } +} + .cfd-financial-stp-modal { display: flex; height: 100%; diff --git a/packages/appstore/src/modules/onboarding/onboarding.tsx b/packages/appstore/src/modules/onboarding/onboarding.tsx index 85c9918eee54..783e23e65f8b 100644 --- a/packages/appstore/src/modules/onboarding/onboarding.tsx +++ b/packages/appstore/src/modules/onboarding/onboarding.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { localize } from '@deriv/translations'; import { isDesktop, routes, ContentFlag } from '@deriv/shared'; -import { Button, Text, Icon, ProgressBarOnboarding } from '@deriv/components'; +import { Button, Text, Icon, ProgressBarTracker } from '@deriv/components'; import TradingPlatformIconProps from 'Assets/svgs/trading-platform'; import { getTradingHubContents } from 'Constants/trading-hub-content'; import { useHistory } from 'react-router-dom'; @@ -25,7 +25,7 @@ type TOnboardingProps = { const Onboarding = observer(({ contents = getTradingHubContents() }: TOnboardingProps) => { const history = useHistory(); - const number_of_steps = Object.keys(contents); + const steps_list = Object.keys(contents); const { traders_hub, client, ui } = useStore(); const { is_eu_country, is_landing_company_loaded, is_logged_in, prev_account_type, setPrevAccountType } = client; const { is_mobile } = ui; @@ -37,8 +37,8 @@ const Onboarding = observer(({ contents = getTradingHubContents() }: TOnboarding }; const nextStep = () => { - if (step < number_of_steps.length) setStep(step + 1); - if (step === number_of_steps.length) { + if (step < steps_list.length) setStep(step + 1); + if (step === steps_list.length) { toggleIsTourOpen(true); history.push(routes.traders_hub); if (is_demo_low_risk) { @@ -60,7 +60,7 @@ const Onboarding = observer(({ contents = getTradingHubContents() }: TOnboarding content_flag === ContentFlag.EU_DEMO; const is_eu_user = (is_logged_in && eu_user) || (!is_logged_in && is_eu_country); - const onboarding_step = number_of_steps[step - 1]; + const onboarding_step = steps_list[step - 1]; const footer_header = contents[onboarding_step]?.footer_header; const footer_text = contents[onboarding_step]?.footer_text; @@ -118,7 +118,7 @@ const Onboarding = observer(({ contents = getTradingHubContents() }: TOnboarding - +