From 7271c21b340fe75421a7d07f52ce1757769ced64 Mon Sep 17 00:00:00 2001 From: Maxime Bajeux Date: Mon, 7 Oct 2024 16:24:33 +0200 Subject: [PATCH] feat(container): merge with ods feedback and new icons ref: MANAGER-14461 Signed-off-by: Maxime Bajeux --- .../nav-reshuffle/sidebar/SidebarLink.tsx | 24 ++++++++----------- .../nav-reshuffle/sidebar/style.module.scss | 4 ---- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/SidebarLink.tsx b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/SidebarLink.tsx index 43c72b0b639d..9c2bd8ddb212 100644 --- a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/SidebarLink.tsx +++ b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/SidebarLink.tsx @@ -5,7 +5,10 @@ import SidebarLinkTag from './SidebarLinkTag'; import { Node } from './navigation-tree/node'; import StaticLink from '@/container/nav-reshuffle/sidebar/StaticLink'; import { OsdsIcon } from '@ovhcloud/ods-components/react'; -import { ODS_ICON_NAME, ODS_ICON_SIZE } from '@ovhcloud/ods-components'; +import { + ODS_ICON_NAME, + ODS_ICON_SIZE, +} from '@ovhcloud/ods-components'; import { SvgIconWrapper } from '@ovh-ux/ovh-product-icons/utils/SvgIconWrapper'; export type SidebarLinkProps = { @@ -22,8 +25,8 @@ const SidebarLink: React.FC> = ({ count = 0, node = {}, linkParams = {}, - handleOnClick = () => {}, - handleOnEnter = () => {}, + handleOnClick = () => { }, + handleOnEnter = () => { }, id = '', isShortText = false, }: SidebarLinkProps): JSX.Element => { @@ -55,16 +58,9 @@ const SidebarLink: React.FC> = ({ data-testid={id} role="button" > - - - - - {t(node.translation)} + + + {!isShortText && {t(node.translation)}} {(count as number) > 0 && ( @@ -86,4 +82,4 @@ const SidebarLink: React.FC> = ({ ); }; -export default SidebarLink; +export default SidebarLink; \ No newline at end of file diff --git a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/style.module.scss b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/style.module.scss index 0954585e3cb5..7485cadc9ea9 100644 --- a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/style.module.scss +++ b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/style.module.scss @@ -340,10 +340,6 @@ $sidebar-font-size: 0.875rem; white-space: nowrap; } - &_icon { - height: 0; - } - &_text, &_short &_icon { transition: opacity 0.1s ease-in 0.2s; opacity: 1;