Skip to content

Commit

Permalink
Merge pull request facebook#64 from szymonzmyslony/master
Browse files Browse the repository at this point in the history
Added segmentedControllOSRe
  • Loading branch information
wokalski authored Aug 30, 2017
2 parents 0a2fc89 + b87082b commit b84aad9
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 0 deletions.
66 changes: 66 additions & 0 deletions src/components/segmentedControllOSRe.re
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
external view : ReasonReact.reactClass = "SegmentedControlIOS" [@@bs.module "react-native"];

let make
::values
::selectedIndex=?
::onChange=?
::enabled=?
::momentary=?
::tintColor=?
::onValueChange=?
::accessibilityLabel=?
::accessible=?
::hitSlop=?
::onAccessibilityTap=?
::onLayout=?
::onMagicTap=?
::responderHandlers=?
::pointerEvents=?
::removeClippedSubviews=?
::style=?
::testID=?
::accessibilityComponentType=?
::accessibilityLiveRegion=?
::collapsable=?
::importantForAccessibility=?
::needsOffscreenAlphaCompositing=?
::renderToHardwareTextureAndroid=?
::accessibilityTraits=?
::accessibilityViewIsModal=?
::shouldRasterizeIOS=? =>
ReasonReact.wrapJsForReason
reactClass::view
props::(
Props.extendView
Js.Undefined.(
{
"enabled": from_opt @@ UtilsRN.optBoolToOptJsBoolean enabled,
"momentary": from_opt @@ UtilsRN.optBoolToOptJsBoolean momentary,
"tintColor": from_opt tintColor,
"values": Array.of_list values,
"selectedIndex": from_opt selectedIndex,
"onChange": from_opt onChange,
"onValueChange": from_opt onValueChange
}
)
::?accessibilityLabel
::?accessible
::?hitSlop
::?onAccessibilityTap
::?onLayout
::?onMagicTap
::?responderHandlers
::?pointerEvents
::?removeClippedSubviews
::?style
::?testID
::?accessibilityComponentType
::?accessibilityLiveRegion
::?collapsable
::?importantForAccessibility
::?needsOffscreenAlphaCompositing
::?renderToHardwareTextureAndroid
::?accessibilityTraits
::?accessibilityViewIsModal
::?shouldRasterizeIOS
);
49 changes: 49 additions & 0 deletions src/components/segmentedControllOSRe.rei
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
let make:
values::list string =>
selectedIndex::int? =>
onChange::(RNEvent.t => unit)? =>
enabled::bool? =>
momentary::bool? =>
tintColor::string? =>
onValueChange::(string => unit)? =>
accessibilityLabel::ReasonReact.reactElement? =>
accessible::bool? =>
hitSlop::TypesRN.insets? =>
onAccessibilityTap::(unit => unit)? =>
onLayout::(RNEvent.NativeLayoutEvent.t => unit)? =>
onMagicTap::(unit => unit)? =>
responderHandlers::Props.touchResponderHandlers? =>
pointerEvents::[ | `auto | `none | `boxNone | `boxOnly]? =>
removeClippedSubviews::bool? =>
style::StyleRe.t? =>
testID::string? =>
accessibilityComponentType::[ | `none | `button | `radiobutton_checked | `radiobutton_unchecked]? =>
accessibilityLiveRegion::[ | `none | `polite | `assertive]? =>
collapsable::bool? =>
importantForAccessibility::[ | `auto | `yes | `no | `noHideDescendants]? =>
needsOffscreenAlphaCompositing::bool? =>
renderToHardwareTextureAndroid::bool? =>
accessibilityTraits::
list [
| `none
| `button
| `link
| `header
| `search
| `image
| `selected
| `plays
| `key
| `text
| `summary
| `disabled
| `frequentUpdates
| `startsMedia
| `adjustable
| `allowsDirectInteraction
| `pageTurn
]? =>
accessibilityViewIsModal::bool? =>
shouldRasterizeIOS::bool? =>
array ReasonReact.reactElement =>
ReasonReact.component ReasonReact.stateless ReasonReact.noRetainedProps;
2 changes: 2 additions & 0 deletions src/reactNative.re
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ module PanResponder = {

module Vibration = VibrationRe;

module SegmentedControllOS = SegmentedControllOSRe;


/**
* New Modules due to Reason
Expand Down

0 comments on commit b84aad9

Please sign in to comment.