diff --git a/packages/experience/src/Layout/SecondaryPageLayout/index.tsx b/packages/experience/src/Layout/SecondaryPageLayout/index.tsx index 3cd23db0b..528da1ad2 100644 --- a/packages/experience/src/Layout/SecondaryPageLayout/index.tsx +++ b/packages/experience/src/Layout/SecondaryPageLayout/index.tsx @@ -14,9 +14,10 @@ type Props = { title: TFuncKey; description?: TFuncKey | ReactElement | ''; titleProps?: Record; - onSkip?: () => void; descriptionProps?: Record; notification?: TFuncKey; + onSkip?: () => void; + isNavBarHidden?: boolean; children: React.ReactNode; }; @@ -24,9 +25,10 @@ const SecondaryPageLayout = ({ title, description, titleProps, - onSkip, descriptionProps, notification, + onSkip, + isNavBarHidden, children, }: Props) => { const { isMobile } = usePlatform(); @@ -34,7 +36,7 @@ const SecondaryPageLayout = ({ return (
- + {isMobile && notification && ( )} diff --git a/packages/experience/src/components/NavBar/index.module.scss b/packages/experience/src/components/NavBar/index.module.scss index e8f97a7d5..81a6ab36b 100644 --- a/packages/experience/src/components/NavBar/index.module.scss +++ b/packages/experience/src/components/NavBar/index.module.scss @@ -43,6 +43,10 @@ .navButton > span { display: none; } + + .navBar.hidden { + visibility: hidden; + } } :global(body.desktop) { @@ -59,4 +63,8 @@ text-decoration: underline; } } + + .navBar.hidden { + display: none; + } } diff --git a/packages/experience/src/components/NavBar/index.tsx b/packages/experience/src/components/NavBar/index.tsx index afc9a19f0..793328c87 100644 --- a/packages/experience/src/components/NavBar/index.tsx +++ b/packages/experience/src/components/NavBar/index.tsx @@ -1,3 +1,4 @@ +import classNames from 'classnames'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; @@ -11,11 +12,12 @@ import * as styles from './index.module.scss'; type Props = { title?: string; type?: 'back' | 'close'; + isHidden?: boolean; onClose?: () => void; onSkip?: () => void; }; -const NavBar = ({ title, type = 'back', onClose, onSkip }: Props) => { +const NavBar = ({ title, type = 'back', isHidden, onClose, onSkip }: Props) => { const navigate = useNavigate(); const { t } = useTranslation(); @@ -38,7 +40,7 @@ const NavBar = ({ title, type = 'back', onClose, onSkip }: Props) => { }, [isClosable, navigate, onClose]); return ( -
+
{ return (