Compare commits

...

2 Commits

Author SHA1 Message Date
satyajit.happy
f9cfbd01d8 chore: publish
- @react-navigation/bottom-tabs@5.0.0-alpha.15
 - @react-navigation/example@5.0.0-alpha.16
2019-10-22 15:45:16 +02:00
satyajit.happy
3bf46e1ad2 refactor: don't pass orientation to label 2019-10-22 15:30:49 +02:00
7 changed files with 24 additions and 14 deletions

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [5.0.0-alpha.15](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/bottom-tabs@5.0.0-alpha.14...@react-navigation/bottom-tabs@5.0.0-alpha.15) (2019-10-22)
**Note:** Version bump only for package @react-navigation/bottom-tabs
# [5.0.0-alpha.14](https://github.com/react-navigation/navigation-ex/compare/@react-navigation/bottom-tabs@5.0.0-alpha.13...@react-navigation/bottom-tabs@5.0.0-alpha.14) (2019-10-15)

View File

@@ -10,7 +10,7 @@
"android",
"tab"
],
"version": "5.0.0-alpha.14",
"version": "5.0.0-alpha.15",
"license": "MIT",
"repository": {
"type": "git",

View File

@@ -71,11 +71,7 @@ export type BottomTabNavigationOptions = {
*/
tabBarLabel?:
| React.ReactNode
| ((props: {
focused: boolean;
color: string;
size: number;
}) => React.ReactNode);
| ((props: { focused: boolean; color: string }) => React.ReactNode);
/**
* React Element or a function that given { focused: boolean, color: string } returns a React.Node, to display in the tab bar.
@@ -221,7 +217,6 @@ export type BottomTabBarProps = BottomTabBarOptions & {
| ((scene: {
focused: boolean;
color: string;
orientation: 'horizontal' | 'vertical';
}) => React.ReactNode | undefined)
| React.ReactNode;
getTestID: (props: { route: Route<string> }) => string | undefined;

View File

@@ -157,11 +157,7 @@ export default class TabBarBottom extends React.Component<Props, State> {
}
if (typeof label === 'function') {
return label({
focused,
color,
orientation: horizontal ? 'horizontal' : 'vertical',
});
return label({ focused, color });
}
return label;

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [5.0.0-alpha.16](https://github.com/satya164/navigation-ex/compare/@react-navigation/example@5.0.0-alpha.15...@react-navigation/example@5.0.0-alpha.16) (2019-10-22)
**Note:** Version bump only for package @react-navigation/example
# [5.0.0-alpha.15](https://github.com/satya164/navigation-ex/compare/@react-navigation/example@5.0.0-alpha.14...@react-navigation/example@5.0.0-alpha.15) (2019-10-22)
**Note:** Version bump only for package @react-navigation/example

View File

@@ -1,7 +1,7 @@
{
"name": "@react-navigation/example",
"description": "Demo app to showcase various functionality of React Navigation",
"version": "5.0.0-alpha.15",
"version": "5.0.0-alpha.16",
"private": true,
"workspaces": {
"nohoist": [

View File

@@ -49,7 +49,10 @@ export default function BottomTabsScreen() {
name="chat"
component={Chat}
options={{
title: 'Chat',
tabBarLabel: props => {
console.log(props);
return null;
},
tabBarIcon: getTabBarIcon('message-reply'),
tabBarButtonComponent: TouchableBounce,
}}