Skip to content

Commit ab39346

Browse files
committed
Fixes
1 parent 48f1529 commit ab39346

File tree

10 files changed

+27
-19
lines changed

10 files changed

+27
-19
lines changed

docs/drawer-navigator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ The `progress` node can be used to do interesting animations in your `drawerCont
183183

184184
```js
185185
function CustomDrawerContent({ progress, ...rest }) {
186-
const translateX = props.drawerOpenProgress.interpolate({
186+
const translateX = Animated.interpolate(progress, {
187187
inputRange: [0, 1],
188188
outputRange: [-100, 0],
189189
});

docs/handling-safe-area.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ export default function App() {
6161
<Stack.Navigator initialRouteName="Home" headerMode="none">
6262
<Stack.Screen name="Home">
6363
{() => (
64-
<Tab.Navigator
65-
initialRouteName="Analitics"
66-
tabBarComponent={() => null}
67-
>
64+
<Tab.Navigator initialRouteName="Analitics" tabBar={() => null}>
6865
<Tab.Screen name="Analitics" component={Demo} />
6966
<Tab.Screen name="Profile" component={Demo} />
7067
</Tab.Navigator>
@@ -85,8 +82,7 @@ To fix this issue you can apply safe area insets on your content. This can be ac
8582
<samp id="safe-area-example" />
8683

8784
```jsx
88-
import { SafeAreaProvider } from 'react-native-safe-area-context';
89-
import SafeAreaView from 'react-native-safe-area-view';
85+
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
9086

9187
function Demo() {
9288
return (

docs/tab-based-navigation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ export default function App() {
7070
let iconName;
7171

7272
if (route.name === 'Home') {
73-
iconName = `ios-information-circle${focused ? '' : '-outline'}`;
73+
iconName = focused ? 'ios-information-circle' : 'ios-information-circle-outline';
7474
} else if (route.name === 'Settings') {
75-
iconName = `ios-options`;
75+
iconName = focused ? 'ios-list-box' : 'ios-list';
7676
}
7777

7878
// You can return any component that you like here!

website/static/examples/next/hidden-components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function App() {
2525
{() => (
2626
<Tab.Navigator
2727
initialRouteName="Analitics"
28-
tabBarComponent={() => null}
28+
tabBar={() => null}
2929
>
3030
<Tab.Screen name="Analitics" component={Demo} />
3131
<Tab.Screen name="Profile" component={Demo} />

website/static/examples/next/safe-area-example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function App() {
2929
{() => (
3030
<Tab.Navigator
3131
initialRouteName="Analitics"
32-
tabBarComponent={() => null}
32+
tabBar={() => null}
3333
>
3434
<Tab.Screen name="Analitics" component={Demo} />
3535
<Tab.Screen name="Profile" component={Demo} />

website/static/examples/next/tab-based-navigation-badges.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,23 @@ export default function App() {
6464
if (route.name === 'Home') {
6565
return (
6666
<HomeIconWithBadge
67-
name={`ios-information-circle${focused ? '' : '-outline'}`}
67+
name={
68+
focused
69+
? 'ios-information-circle'
70+
: 'ios-information-circle-outline'
71+
}
6872
size={size}
6973
color={color}
7074
/>
7175
);
7276
} else if (route.name === 'Settings') {
73-
return <Ionicons name="ios-options" size={size} color={color} />;
77+
return (
78+
<Ionicons
79+
name={focused ? 'ios-list-box' : 'ios-list'}
80+
size={size}
81+
color={color}
82+
/>
83+
);
7484
}
7585
},
7686
})}

website/static/examples/next/tab-based-navigation-icons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ export default function App() {
3333
let iconName;
3434

3535
if (route.name === 'Home') {
36-
iconName = `ios-information-circle${focused ? '' : '-outline'}`;
36+
iconName = focused ? 'ios-information-circle' : 'ios-information-circle-outline';
3737
} else if (route.name === 'Settings') {
38-
iconName = 'ios-options';
38+
iconName = focused ? 'ios-list-box' : 'ios-list';
3939
}
4040

4141
// You can return any component that you like here!

website/static/examples/next/use-safe-area.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function App() {
3636
{() => (
3737
<Tab.Navigator
3838
initialRouteName="Analitics"
39-
tabBarComponent={() => null}
39+
tabBar={() => null}
4040
>
4141
<Tab.Screen name="Analitics" component={Demo} />
4242
<Tab.Screen name="Profile" component={Demo} />

website/versioned_docs/version-4.x/drawer-navigator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const styles = StyleSheet.create({
8585

8686
```js
8787
const CustomDrawerContentComponent = props => {
88-
const translateX = props.drawerOpenProgress.interpolate({
88+
const translateX = Animated.interpolate(drawerOpenProgress, {
8989
inputRange: [0, 1],
9090
outputRange: [-100, 0],
9191
});

website/versioned_docs/version-4.x/tab-based-navigation.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@ export default createBottomTabNavigator(
7070
let IconComponent = Ionicons;
7171
let iconName;
7272
if (routeName === 'Home') {
73-
iconName = `ios-information-circle${focused ? '' : '-outline'}`;
73+
iconName = focused
74+
? 'ios-information-circle'
75+
: 'ios-information-circle-outline';
7476
// Sometimes we want to add badges to some icons.
7577
// You can check the implementation below.
7678
IconComponent = HomeIconWithBadge;
7779
} else if (routeName === 'Settings') {
78-
iconName = `ios-options`;
80+
iconName = focused ? 'ios-list-box' : 'ios-list';
7981
}
8082

8183
// You can return any component that you like here!

0 commit comments

Comments
 (0)