mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
This commit is contained in:
Vendored
+12
-2
@@ -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 <https://github.com/alloy>, Fedor Nezhivoi <https://github.com/gyzerok>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -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<TabBarIOSProperties> {
|
||||
@@ -5783,7 +5793,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
|
||||
|
||||
@@ -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 (
|
||||
<TabBarIOS
|
||||
barTintColor="darkslateblue"
|
||||
itemPositioning="center"
|
||||
tintColor="white"
|
||||
translucent={ true }
|
||||
unselectedTintColor="black"
|
||||
unselectedItemTintColor="red">
|
||||
<TabBarIOS.Item
|
||||
badge={ 0 }
|
||||
badgeColor="red"
|
||||
icon={{uri: undefined}}
|
||||
selected={ true }
|
||||
onPress={() => {}}
|
||||
renderAsOriginal={ true }
|
||||
selectedIcon={ undefined }
|
||||
systemIcon="history"
|
||||
title="Item 1">
|
||||
</TabBarIOS.Item>
|
||||
</TabBarIOS>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user