import { TabNavProps } from './TabNav.type'; import { useTabNav } from './useTabNav'; import { HoverBox, Item, ItemDiv, StyledTabNav, Underline } from './StyledTabNav'; export function TabNav(props: TabNavProps) { const { ref, targets, tabs, selected, blurTab, hoverTab, clickTab, hoverBoxStyle, underlineStyle, } = useTabNav(props); return ( {tabs.map((tab) => { return ( { targets.current[tab.value] = el as HTMLDivElement; }} onMouseOver={() => hoverTab(tab.value)} onMouseLeave={() => blurTab()} > clickTab(tab.value)} > {tab.title} ); })} ); }