From eab9a9239c736220e6b59136775c82bebf37d9ad Mon Sep 17 00:00:00 2001 From: Jason Healy Date: Tue, 9 May 2017 16:35:13 +0100 Subject: [PATCH 1/3] change snapToInterval prop from array to number --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a7dc4da43a..1f407e7f02 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -5769,7 +5769,7 @@ export interface ScrollViewPropertiesIOS { * This can be used for paginating through children that have lengths smaller than the scroll view. * Used in combination with snapToAlignment. */ - snapToInterval?: number[] + snapToInterval?: number /** * An array of child indices determining which children get docked to the From a6e481c4bc9cf11c1dec0d77d0118d9c3430415f Mon Sep 17 00:00:00 2001 From: asakasa Date: Wed, 10 May 2017 02:37:09 +0900 Subject: [PATCH 2/3] Add new types for TabBar in react-native The types are available since iOS 10. And then test for TabBar added. --- types/react-native/index.d.ts | 10 ++++++++++ types/react-native/test/index.tsx | 28 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index c5a656d15d..5b3b1f3a38 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -5097,6 +5097,11 @@ export interface TabBarItemProperties extends ViewProperties { */ badge?: string | number + /** + * Background color for the badge. Available since iOS 10. + */ + badgeColor?: string + /** * A custom icon for the tab. It is ignored when a system icon is defined. */ @@ -5182,6 +5187,11 @@ export interface TabBarIOSProperties extends ViewProperties { * Color of text on unselected tabs */ unselectedTintColor?: string + + /** + * Color of unselected tab icons. Available since iOS 10. + */ + unselectedItemTintColor?: string } export interface TabBarIOSStatic extends React.ComponentClass { diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 62e925575b..3d7ddeac07 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -34,6 +34,7 @@ import { ScrollView, ScrollViewProps, RefreshControl, + TabBarIOS, } from 'react-native'; function testDimensions() { @@ -255,3 +256,30 @@ class ScrollerListComponentTest extends React.Component<{}, { dataSource: ListVi ) } } + + +class TabBarTest extends React.Component<{}, {}> { + render() { + return ( + + {}} + renderAsOriginal={ true } + selectedIcon={ undefined } + systemIcon="history" + title="Item 1"> + + + ); + } +} From bf2499f1d28475dd2c8cc62dde44a9e83f0a94c5 Mon Sep 17 00:00:00 2001 From: asakasa Date: Wed, 10 May 2017 03:16:59 +0900 Subject: [PATCH 3/3] Update version of React Native Now current version of React Native is 0.44 --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 5b3b1f3a38..214352f808 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-native 0.43 +// Type definitions for react-native 0.44 // Project: https://github.com/facebook/react-native // Definitions by: Eloy DurĂ¡n , Fedor Nezhivoi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped