import type { FC, FunctionComponent, PropsWithoutRef, ReactNode } from 'react' import type { ExtractProps } from '../types' import type { TabGroupProps } from './TabGroup' import type { TabListProps } from './TabList' import { Tab as HeadlessTab } from '@headlessui/react' import classNames from 'classnames' import { forwardRef, Fragment } from 'react' import { Button } from '../button' import { TabGroup } from './TabGroup' import { TabList } from './TabList' export type TabButton = PropsWithoutRef, 'children'>> & { children: ReactNode } const _Tab: FC = forwardRef(({ children, className, ...props }, ref) => { return ( {({ selected }) => ( )} ) }) export const Tab: FunctionComponent & { Group: FC List: FC Panels: FC> Panel: FC> } = Object.assign(_Tab, { Group: TabGroup, List: TabList, Panels: HeadlessTab.Panels, Panel: HeadlessTab.Panel, })