diff --git a/example/src/App.tsx b/example/src/App.tsx index 2d40487..1483636 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -22,6 +22,11 @@ import FourTabs from './Examples/FourTabs'; const examples = [ { component: ThreeTabs, name: 'Three Tabs' }, { component: FourTabs, name: 'Four Tabs' }, + { + component: FourTabs, + name: 'Four Tabs - No header', + screenOptions: { headerShown: false }, + }, { component: JSBottomTabs, name: 'JS Bottom Tabs' }, ]; @@ -91,6 +96,7 @@ export default function Navigation() { key={index} name={example.name} component={example.component} + options={example.screenOptions} /> ))} diff --git a/example/src/Examples/FourTabs.tsx b/example/src/Examples/FourTabs.tsx index 5681cf3..6ec946a 100644 --- a/example/src/Examples/FourTabs.tsx +++ b/example/src/Examples/FourTabs.tsx @@ -5,7 +5,7 @@ import { Albums } from '../Screens/Albums'; import { Contacts } from '../Screens/Contacts'; import { Chat } from '../Screens/Chat'; -export default function ThreeTabs() { +export default function FourTabs() { const [index, setIndex] = useState(0); const [routes] = useState([ { key: 'article', title: 'Article', icon: 'document.fill', badge: '!' }, diff --git a/src/TabViewNativeComponent.ts b/src/TabViewNativeComponent.ts index 991d05b..aaa1ce2 100644 --- a/src/TabViewNativeComponent.ts +++ b/src/TabViewNativeComponent.ts @@ -12,7 +12,7 @@ export type OnPageSelectedEventData = Readonly<{ export type TabViewItems = ReadonlyArray<{ key: string; title: string; - icon: string; + icon?: string; badge?: string; }>; diff --git a/src/index.tsx b/src/index.tsx index 9ad9e54..5442084 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,10 +1,4 @@ import TabView from './TabView'; -import type { - TabViewItems, - OnPageSelectedEventData, -} from './TabViewNativeComponent'; - -export type { TabViewItems, OnPageSelectedEventData }; export { SceneMap } from './SceneMap';