import type { BottomTabLinkProps, BottomTabType } from './navigationUtils'; import useBottomTabIndex from './useBottomTabIndex'; import Link from './Link'; export default function BottomTabLink({ to, params, children, onPress, }: BottomTabLinkProps) { const { currentTab } = useBottomTabIndex(); const isSelected = currentTab === to; return ( {(linkProps) => children({ ...linkProps, isSelected, testID: `bottomTab-${to.child.path}`, }) } ); }