Skip to content

Commit e2f7232

Browse files
authored
docs: document new package (#153)
1 parent c6f9a8f commit e2f7232

File tree

6 files changed

+25
-4
lines changed

6 files changed

+25
-4
lines changed

docs/docs/docs/guides/usage-with-expo-router.md renamed to docs/docs/docs/guides/usage-with-expo-router.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
import { PackageManagerTabs } from '@theme';
2+
13
# Usage with Expo Router
24

5+
First install `@bottom-tabs/react-navigation` which provides a native bottom tab navigator for React Navigation.
6+
7+
<PackageManagerTabs command="install @bottom-tabs/react-navigation" />
8+
39
First, create a custom layout adapter for the native bottom tabs:
410

511
```tsx
612
import { withLayoutContext } from "expo-router";
7-
import { createNativeBottomTabNavigator } from "react-native-bottom-tabs/react-navigation";
13+
import { createNativeBottomTabNavigator } from '@bottom-tabs/react-navigation';
814

915
export const Tabs = withLayoutContext(
1016
createNativeBottomTabNavigator().Navigator

docs/docs/docs/guides/usage-with-one.md renamed to docs/docs/docs/guides/usage-with-one.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
import { PackageManagerTabs } from '@theme';
2+
13
# Usage with One
24

5+
The `@bottom-tabs/react-navigation` package provides a native bottom tab navigator for React Navigation.
6+
7+
<PackageManagerTabs command="install @bottom-tabs/react-navigation" />
8+
39
In order to use this navigator with [One](https://onestack.dev/), you need to wrap it with the `withLayoutContext`.
410

511

612
```tsx
713
import { withLayoutContext } from 'one'
8-
import { createNativeBottomTabNavigator } from 'react-native-bottom-tabs/react-navigation'
14+
import { createNativeBottomTabNavigator } from '@bottom-tabs/react-navigation';
915

1016
const NativeTabsNavigator = createNativeBottomTabNavigator().Navigator
1117

docs/docs/docs/guides/usage-with-react-navigation.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { Badge } from '@theme';
2+
import { PackageManagerTabs } from '@theme';
23

34
# Usage with React Navigation
45

6+
First install `@bottom-tabs/react-navigation` which provides a native bottom tab navigator for React Navigation.
7+
8+
<PackageManagerTabs command="install @bottom-tabs/react-navigation" />
9+
510
:::warning
611
To use this navigator, ensure that you have [`@react-navigation/native` and its dependencies (follow this guide)](https://reactnavigation.org/docs/getting-started).
712
:::
@@ -12,7 +17,7 @@ Minimal example of using `createNativeBottomTabNavigator` with React Navigation:
1217
import * as React from 'react';
1318
import { Text, View } from 'react-native';
1419
import { NavigationContainer } from '@react-navigation/native';
15-
import { createNativeBottomTabNavigator } from 'react-native-bottom-tabs/react-navigation';
20+
import { createNativeBottomTabNavigator } from '@bottom-tabs/react-navigation';
1621

1722
const Tab = createNativeBottomTabNavigator();
1823

docs/docs/docs/guides/usage-with-vector-icons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Follow installation guide in React Native Vector Icons [README](https://github.c
1111
### Usage
1212

1313
```tsx
14-
import { createNativeBottomTabNavigator } from 'react-native-bottom-tabs/react-navigation';
14+
import { createNativeBottomTabNavigator } from '@bottom-tabs/react-navigation';
1515
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
1616

1717
const homeIcon = Icon.getImageSourceSync('home', 24);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"test": "turbo run test",
1414
"typecheck": "turbo run typecheck",
1515
"prepare": "turbo run prepare",
16+
"release": "turbo run release",
1617
"build:android": "turbo run build:android",
1718
"build:android:fabric": "turbo run build:android:fabric",
1819
"build:ios": "turbo run build:ios",

turbo.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"inputs": ["**/*.ts", "**/*.tsx"]
1111
},
1212
"test": {},
13+
"release": {
14+
"inputs": ["package.json", "lib/**"]
15+
},
1316
"prepare": {
1417
"dependsOn": ["^prepare"],
1518
"outputs": ["lib/**"],

0 commit comments

Comments
 (0)