From 18ee39c850d527923d95306641251ca8f96c362c Mon Sep 17 00:00:00 2001 From: Daniil Suvorov Date: Thu, 25 Jan 2024 17:42:52 +0300 Subject: [PATCH] feat(TabsItem): add anchor attributes (#6439) - closed #5879 --- packages/vkui/src/components/TabsItem/TabsItem.module.css | 1 + packages/vkui/src/components/TabsItem/TabsItem.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/vkui/src/components/TabsItem/TabsItem.module.css b/packages/vkui/src/components/TabsItem/TabsItem.module.css index 415f2c3470..ee92a95ee4 100644 --- a/packages/vkui/src/components/TabsItem/TabsItem.module.css +++ b/packages/vkui/src/components/TabsItem/TabsItem.module.css @@ -10,6 +10,7 @@ min-block-size: 32px; border-radius: var(--vkui--size_border_radius--regular); transition: background-color 150ms ease-out; + text-decoration: none; } .TabsItem--withGaps { diff --git a/packages/vkui/src/components/TabsItem/TabsItem.tsx b/packages/vkui/src/components/TabsItem/TabsItem.tsx index e1431fe09c..cc2e25aeda 100644 --- a/packages/vkui/src/components/TabsItem/TabsItem.tsx +++ b/packages/vkui/src/components/TabsItem/TabsItem.tsx @@ -5,7 +5,7 @@ import { useExternRef } from '../../hooks/useExternRef'; import { usePrevious } from '../../hooks/usePrevious'; import { useDOM } from '../../lib/dom'; import { warnOnce } from '../../lib/warnOnce'; -import { HTMLAttributesWithRootRef } from '../../types'; +import { AnchorHTMLAttributesOnly, HTMLAttributesWithRootRef } from '../../types'; import { TabsContextProps, TabsModeContext } from '../Tabs/Tabs'; import { Tappable } from '../Tappable/Tappable'; import { Headline } from '../Typography/Headline/Headline'; @@ -29,7 +29,9 @@ const fillModeClassNames = { shrinked: styles['TabsItem--shrinked'], }; -export interface TabsItemProps extends HTMLAttributesWithRootRef { +export interface TabsItemProps + extends HTMLAttributesWithRootRef, + AnchorHTMLAttributesOnly { /** * Добавляет иконку слева. *