From 4673f8c5a584bce02e6f6a16fa7b86ab833a35d3 Mon Sep 17 00:00:00 2001 From: Angelina Gadzhieva Date: Wed, 27 Mar 2024 14:29:27 +0300 Subject: [PATCH] feat(CompositeBar): use uikit ActionTooltip instead of Tooltip (#217) --- src/components/CompositeBar/Item/Item.scss | 6 ++++++ src/components/CompositeBar/Item/Item.tsx | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/CompositeBar/Item/Item.scss b/src/components/CompositeBar/Item/Item.scss index 9a3c06e..241e79b 100644 --- a/src/components/CompositeBar/Item/Item.scss +++ b/src/components/CompositeBar/Item/Item.scss @@ -50,6 +50,12 @@ $block: '.#{variables.$ns}composite-bar-item'; var(--gn-aside-header-general-item-icon-color, var(--_--item-general-icon-color)) ); } + + // FIXME: fix hack in the next major + &-tooltip .g-action-tooltip__description { + color: var(--g-color-text-light-primary); + margin-block-start: 0px; + } } &__icon-place { diff --git a/src/components/CompositeBar/Item/Item.tsx b/src/components/CompositeBar/Item/Item.tsx index 5ad8ec0..f6f80a9 100644 --- a/src/components/CompositeBar/Item/Item.tsx +++ b/src/components/CompositeBar/Item/Item.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {Icon, List, Popup, PopupPlacement, PopupProps, Tooltip} from '@gravity-ui/uikit'; +import {ActionTooltip, Icon, List, Popup, PopupPlacement, PopupProps} from '@gravity-ui/uikit'; import {useAsideHeaderContext} from '../../AsideHeader/AsideHeaderContext'; import {ASIDE_HEADER_ICON_SIZE} from '../../constants'; @@ -136,8 +136,9 @@ export const Item: React.FC = (props) => { const makeIconNode = (iconEl: React.ReactNode): React.ReactNode => { return compact ? ( - = (props) => { > {iconEl} - + ) : ( iconEl );