diff --git a/src/shared/components/Tabs/Tab/Tab.tsx b/src/shared/components/Tabs/Tab/Tab.tsx index ce336fb792..a0926f1cfa 100644 --- a/src/shared/components/Tabs/Tab/Tab.tsx +++ b/src/shared/components/Tabs/Tab/Tab.tsx @@ -1,6 +1,5 @@ import React, { useCallback, FC, ReactNode } from "react"; import classNames from "classnames"; -import { useLongPress } from "use-long-press"; import { useTabContext } from "../context"; import { getPanelId, getLabelId } from "../helpers"; import "./index.scss"; @@ -31,8 +30,6 @@ const Tab: FC = (props) => { const panelId = getPanelId(value, panelIdTemplate); const labelId = getLabelId(panelId); - const getLongPressProps = useLongPress(null); - const handleChange = useCallback(() => { onChange(value, labelId); }, [onChange, value, labelId]); @@ -56,8 +53,6 @@ const Tab: FC = (props) => { aria-selected={isActive} aria-controls={panelId} onClick={handleChange} - onContextMenu={(e) => e.preventDefault()} - {...getLongPressProps()} > {withIcons && icon} {label} diff --git a/src/shared/components/Tabs/Tab/index.scss b/src/shared/components/Tabs/Tab/index.scss index 0138493986..fb6a7c10df 100644 --- a/src/shared/components/Tabs/Tab/index.scss +++ b/src/shared/components/Tabs/Tab/index.scss @@ -32,12 +32,6 @@ --tab-color: var(--tab-inactive-hover-color); } - @media (hover: hover) and (pointer: fine) { - &:hover { - --tab-color: var(--tab-inactive-hover-color); - } - } - &:first-child { --tab-ml: 0; } @@ -56,17 +50,6 @@ --tab-bb-color: var(--secondary-text); --tab-color: var(--secondary-text); } - - @media (hover: hover) and (pointer: fine) { - &:hover { - --tab-bb-color: var(--secondary-text); - --tab-color: var(--secondary-text); - } - } - // &:hover { - // --tab-bb-color: var(--secondary-text); - // --tab-color: var(--secondary-text); - // } } .custom-tab--with-icon { --tab-pb: 0; @@ -76,3 +59,18 @@ align-items: center; border: 0; } + +@media (hover: hover) and (pointer: fine) { + .custom-tab { + &:hover { + --tab-color: var(--tab-inactive-hover-color); + } + } + + .custom-tab--active { + &:hover { + --tab-bb-color: var(--secondary-text); + --tab-color: var(--secondary-text); + } + } +} diff --git a/src/shared/layouts/CommonSidenavLayout/components/LayoutTabs/LayoutTabs.tsx b/src/shared/layouts/CommonSidenavLayout/components/LayoutTabs/LayoutTabs.tsx index de37d17d22..7cb3148206 100644 --- a/src/shared/layouts/CommonSidenavLayout/components/LayoutTabs/LayoutTabs.tsx +++ b/src/shared/layouts/CommonSidenavLayout/components/LayoutTabs/LayoutTabs.tsx @@ -95,6 +95,7 @@ const LayoutTabs: FC = (props) => { const handleTabChange = (value: unknown) => { if (activeTab === value) { + console.log("SAME TAB. DO NOTHING"); return; }