Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaryiaF/fix: bold the menu option when the user has gone by the child… #4965

Merged
merged 12 commits into from
Mar 16, 2022
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const SubMenu = ({
submenu_icon,
submenu_title,
submenu_suffix_icon,
route_config_path,
}) => {
const [is_expanded, setIsExpanded] = React.useState(false);

Expand All @@ -28,7 +29,11 @@ const SubMenu = ({
<div className={classNames('dc-mobile-drawer__submenu-toggle', submenu_toggle_class)} onClick={toggleMenu}>
{submenu_icon && <Icon className='dc-mobile-drawer__submenu-toggle-icon' icon={submenu_icon} />}
{submenu_title && (
<Text as='h3' size='xs'>
<Text
as='h3'
size='xs'
weight={window.location.pathname.startsWith(route_config_path) ? 'bold' : null}
>
{submenu_title}
</Text>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { BinaryLink } from 'App/Components/Routes';
import getRoutesConfig from 'App/Constants/routes-config';
import { currentLanguage, changeLanguage } from 'Utils/Language';
import LiveChat from 'App/Components/Elements/LiveChat';
import Text from '../../../../../../components/src/components/text/text';
Copy link
Contributor

@balakrishna-deriv balakrishna-deriv Mar 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maryiafrantsava-deriv Text component should be imported at line 3

import { Div100vhContainer, Icon, MobileDrawer, ToggleSwitch, Text } from '@deriv/components';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've done


const MenuLink = ({
changeCurrentLanguage,
Expand Down Expand Up @@ -64,7 +65,9 @@ const MenuLink = ({
onClick={onClickLink}
>
<Icon className='header__menu-mobile-link-icon' icon={icon} />
<span className='header__menu-mobile-link-text'>{text}</span>
<Text as='h3' size='xs' weight={window.location.pathname === '/' ? 'bold' : null}>
{text}
</Text>
{suffix_icon && <Icon className='header__menu-mobile-link-suffix-icon' icon={suffix_icon} />}
</BinaryLink>
);
Expand Down Expand Up @@ -178,6 +181,7 @@ const ToggleMenuDrawer = React.forwardRef(
submenu_title={route_config.getTitle()}
submenu_suffix_icon='IcChevronRight'
onToggle={expandSubMenu}
route_config_path={route_config.path}
>
{!has_subroutes &&
route_config.routes.map((route, index) => {
Expand Down Expand Up @@ -337,9 +341,7 @@ const ToggleMenuDrawer = React.forwardRef(
toggleTheme(!is_dark_mode);
}}
>
<div
className={classNames('header__menu-mobile-link')}
>
<div className={classNames('header__menu-mobile-link')}>
<Icon className='header__menu-mobile-link-icon' icon={'IcTheme'} />
<span className='header__menu-mobile-link-text'>
{localize('Dark theme')}
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/sass/app/_common/layout/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
font-weight: bold;
color: var(--text-prominent);
}
.header__menu-mobile-link-text-regular {
balakrishna-deriv marked this conversation as resolved.
Show resolved Hide resolved
color: var(--text-prominent);
}
}
&-text {
font-size: 1.4rem;
Expand Down