Skip to content

Commit

Permalink
feat(TabsItem): add Tappable props
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackySoul committed May 2, 2024
1 parent caf6d7f commit c6555e4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/vkui/src/components/TabsItem/TabsItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useDOM } from '../../lib/dom';
import { warnOnce } from '../../lib/warnOnce';
import { AnchorHTMLAttributesOnly, HTMLAttributesWithRootRef } from '../../types';
import { TabsContextProps, TabsModeContext } from '../Tabs/Tabs';
import { Tappable } from '../Tappable/Tappable';
import { Tappable, TappableProps } from '../Tappable/Tappable';
import { Headline } from '../Typography/Headline/Headline';
import { Subhead } from '../Typography/Subhead/Subhead';
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';
Expand All @@ -31,7 +31,17 @@ const fillModeClassNames = {

export interface TabsItemProps
extends HTMLAttributesWithRootRef<HTMLElement>,
AnchorHTMLAttributesOnly {
AnchorHTMLAttributesOnly,
Pick<
TappableProps,
| 'activeMode'
| 'hoverMode'
| 'hovered'
| 'activated'
| 'hasActive'
| 'hasHover'
| 'focusVisibleMode'
> {
/**
* Добавляет иконку слева.
*
Expand Down Expand Up @@ -163,7 +173,6 @@ export const TabsItem = ({

return (
<Tappable
{...restProps}
getRootRef={rootRef}
className={classNames(
styles['TabsItem'],
Expand All @@ -181,6 +190,7 @@ export const TabsItem = ({
role={role}
aria-selected={selected}
tabIndex={tabIndex}
{...restProps}
>
{before && <div className={styles['TabsItem__before']}>{before}</div>}
<Headline
Expand Down

0 comments on commit c6555e4

Please sign in to comment.