import type { ComponentType } from 'react'; import type { IconProps } from '@unif/react-native-icons'; import type { StyleProp, ViewStyle } from 'react-native'; export type TabBarItem = { id: string; icon: ComponentType; label: string; /** 图标右上角的数字角标(用 string 才能写 '99+') */ badge?: number | string; /** 单 tab 的 testID(不传则用 `${barTestID}-${id}`) */ testID?: string; }; export type TabBarProps = { /** 默认 glass 跟随系统材质;贴边实色导航可显式选择 solid。 */ surface?: 'solid' | 'glass'; active: string; onChange: (id: string) => void; items: TabBarItem[]; /** 容器附加样式(margin / position 等布局微调)。 */ style?: StyleProp; /** 容器 testID;item testID 自动派生为 `${testID}-${id}` */ testID?: string; };