Skip to content

Commit

Permalink
Accept more props in the Tab component
Browse files Browse the repository at this point in the history
  • Loading branch information
gnapse committed Aug 9, 2024
1 parent 86e219f commit 980955c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import classNames from 'classnames'
import {
useTabStore,
Tab as BaseTab,
TabProps as BaseTabProps,
TabList as BaseTabList,
TabPanel as BaseTabPanel,
TabPanelProps as BaseTabPanelProps,
TabStore,
RoleProps,
} from '@ariakit/react'
import { Inline } from '../inline'
import type { ObfuscatedClassName, Space } from '../utils/common-types'
Expand Down Expand Up @@ -74,7 +74,9 @@ function Tabs({
return <TabsContext.Provider value={memoizedTabState}>{children}</TabsContext.Provider>
}

interface TabProps extends ObfuscatedClassName, Pick<RoleProps, 'render'> {
interface TabProps
extends ObfuscatedClassName,
Omit<BaseTabProps, 'store' | 'className' | 'children' | 'id'> {
/**
* The content to render inside of the tab button
*/
Expand All @@ -84,8 +86,6 @@ interface TabProps extends ObfuscatedClassName, Pick<RoleProps, 'render'> {
* The tab's identifier. This must match its corresponding `<TabPanel>`'s id
*/
id: string

onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void
}

/**
Expand Down

0 comments on commit 980955c

Please sign in to comment.