forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added TabBarIOS and TabBarItemIOS (facebook#50)
* Added TabBarIOS and TabBarItemIOS * Updated status.md * Added interface files for tabBar * Renamed tabbar components * Added types to tabBarIOS
- Loading branch information
1 parent
371989f
commit 978f42c
Showing
7 changed files
with
138 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
external tabBarIOS : ReasonReact.reactClass = "TabBarIOS" [@@bs.module "react-native"]; | ||
|
||
let make | ||
::barTintColor=? | ||
::itemPositioning=? | ||
::style=? | ||
::tintColor=? | ||
::translucent=? | ||
::unselectedItemTintColor=? | ||
::unselectedTintColor=? => | ||
ReasonReact.wrapJsForReason | ||
reactClass::tabBarIOS | ||
props:: | ||
Js.Undefined.( | ||
{ | ||
"barTintColor": from_opt barTintColor, | ||
"itemPositioning": | ||
from_opt ( | ||
UtilsRN.option_map | ||
( | ||
fun x => | ||
switch x { | ||
| `default => "default" | ||
| `lightContent => "light-content" | ||
| `darkContent => "dark-content" | ||
} | ||
) | ||
itemPositioning | ||
), | ||
"style": from_opt style, | ||
"tintColor": from_opt tintColor, | ||
"translucent": from_opt (UtilsRN.optBoolToOptJsBoolean translucent), | ||
"unselectedItemTintColor": from_opt unselectedItemTintColor, | ||
"unselectedTintColor": from_opt unselectedTintColor | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
let make: | ||
barTintColor::string? => | ||
itemPositioning::[ | `fill | `center | `auto]? => | ||
style::StyleRe.t? => | ||
tintColor::string? => | ||
translucent::bool? => | ||
unselectedItemTintColor::string? => | ||
unselectedTintColor::string? => | ||
array ReasonReact.reactElement => | ||
ReasonReact.component ReasonReact.stateless ReasonReact.noRetainedProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
external tabBarItemIOS : ReasonReact.reactClass = | ||
"Item" [@@bs.scope "TabBarIOS"] [@@bs.module "react-native"]; | ||
|
||
let make | ||
title::(title: option string)=? | ||
badgeColor::(badgeColor: option string)=? | ||
::badge=? | ||
::icon=? | ||
::onPress=? | ||
::renderAsOriginal=? | ||
::style=? | ||
::selected=? | ||
::selectedIcon=? | ||
::isTVSelectable=? => | ||
ReasonReact.wrapJsForReason | ||
reactClass::tabBarItemIOS | ||
props:: | ||
Js.Undefined.( | ||
{ | ||
"badgeColor": from_opt badgeColor, | ||
"title": from_opt title, | ||
"badge": from_opt badge, | ||
"icon": from_opt icon, | ||
"onPress": from_opt onPress, | ||
"renderAsOriginal": from_opt (UtilsRN.optBoolToOptJsBoolean renderAsOriginal), | ||
"selected": from_opt (UtilsRN.optBoolToOptJsBoolean selected), | ||
"selectedIcon": from_opt selectedIcon, | ||
"style": from_opt style, | ||
"isTVSelectable": from_opt (UtilsRN.optBoolToOptJsBoolean isTVSelectable) | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
let make: | ||
title::string? => | ||
badgeColor::string? => | ||
badge::string? => | ||
icon::ImageRe.Image.imageSource? => | ||
onPress::'c? => | ||
renderAsOriginal::bool? => | ||
style::StyleRe.t? => | ||
selected::bool? => | ||
selectedIcon::ImageRe.Image.imageSource? => | ||
isTVSelectable::bool? => | ||
array ReasonReact.reactElement => | ||
ReasonReact.component ReasonReact.stateless ReasonReact.noRetainedProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,100 @@ | ||
/** | ||
* Components | ||
*/ | ||
|
||
module ActivityIndicator = ActivityIndicatorRe; | ||
|
||
module Button = ButtonRe; | ||
|
||
module DatePickerIOS = DatePickerIOSRe; | ||
|
||
module FlatList = FlatListRe; | ||
|
||
module Modal = ModalRe; | ||
|
||
module Picker = PickerRe; | ||
|
||
module RefreshControl = RefreshControlRe; | ||
|
||
module ScrollView = ScrollViewRe.ScrollView; | ||
|
||
module SectionList = SectionListRe; | ||
|
||
module Slider = SliderRe; | ||
|
||
module StatusBar = StatusBarRe; | ||
|
||
module Switch = SwitchRe; | ||
|
||
module TabBarIOS = TabBarIOSRe; | ||
|
||
module TabBarItemIOS = TabBarItemIOSRe; | ||
|
||
module Text = TextRe.Text; | ||
|
||
module TextInput = TextInputRe; | ||
|
||
module TouchableHighlight = TouchableHighlightRe; | ||
|
||
module TouchableOpacity = TouchableOpacityRe; | ||
|
||
module TouchableWithoutFeedback = TouchableWithoutFeedbackRe; | ||
|
||
module WebView = WebViewRe; | ||
|
||
module View = { | ||
include ViewRe.View; | ||
include ResponderUtils; | ||
}; | ||
|
||
module Image = ImageRe.Image; | ||
|
||
module Animated = { | ||
include AnimatedRe; | ||
module Text = AnimatedComponentsRe.Text; | ||
module ScrollView = AnimatedComponentsRe.ScrollView; | ||
module View = AnimatedComponentsRe.View; | ||
module Image = AnimatedComponentsRe.Image; | ||
include AnimatedRe; | ||
module Text = AnimatedComponentsRe.Text; | ||
module ScrollView = AnimatedComponentsRe.ScrollView; | ||
module View = AnimatedComponentsRe.View; | ||
module Image = AnimatedComponentsRe.Image; | ||
}; | ||
|
||
|
||
/** | ||
* APIs | ||
*/ | ||
|
||
module Alert = AlertRe; | ||
|
||
module AlertIOS = AlertIOSRe; | ||
|
||
module AppRegistry = AppRegistryRe; | ||
|
||
module AppState = AppStateRe; | ||
|
||
module AsyncStorage = AsyncStorageRe; | ||
|
||
module BackHandler = BackHandlerRe; | ||
|
||
module Dimensions = DimensionsRe; | ||
|
||
module Linking = LinkingRe; | ||
|
||
module NativeModules = NativeModulesRe; | ||
|
||
module NativeEventEmitter = NativeEventEmitterRe; | ||
|
||
module Platform = PlatformRe; | ||
|
||
module StyleSheet = StyleSheetRe; | ||
|
||
module PanResponder = { | ||
include PanResponderRe; | ||
include PanResponderUtils; | ||
}; | ||
|
||
module Vibration = VibrationRe; | ||
|
||
|
||
/** | ||
* New Modules due to Reason | ||
*/ | ||
|
||
module Packager = PackagerRe; | ||
|
||
module Style = StyleRe; |