import * as Ariakit from '@ariakit/react'; import { getClassNames } from '@websolutespa/bom-core'; import { forwardRef, useContext } from 'react'; import styled from 'styled-components'; import { getVariantKey } from '../../variants'; import { UIStyledComponentProps } from '../types'; import { getCssResponsive } from '../utils'; import { TabsContext } from './tabs.context'; import { ITabsVariants, tabsVariants } from './tabs.variants'; const TabsContentStyle = styled(Ariakit.TabPanel) ` ${props => getVariantKey('content', props.variant, props.variants)} ${props => getCssResponsive(props)} `; export type TabsContentProps = Ariakit.TabPanelProps & UIStyledComponentProps<{ className?: string; variant?: keyof typeof tabsVariants | (string & {}); variants?: ITabsVariants; }>; export const TabsContent = forwardRef( function TabsContent({ className, children, variant, variants, ...props }, ref) { const classNames = getClassNames('tabs__content', className); const context = useContext(TabsContext); return (
{children}
); } );