diff --git a/src/components/Text.re b/src/components/Text.re index f97609e0ffb8fe..578b9c036c726d 100644 --- a/src/components/Text.re +++ b/src/components/Text.re @@ -55,8 +55,8 @@ external make: ~ellipsizeMode: [@bs.string] [ | `clip | `head | `middle | `tail]=?, ~numberOfLines: int=?, ~onLayout: Event.layoutEvent => unit=?, - ~onLongPress: unit => unit=?, - ~onPress: unit => unit=?, + ~onLongPress: Event.pressEvent => unit=?, + ~onPress: Event.pressEvent => unit=?, ~pressRetentionOffset: View.edgeInsets=?, ~selectable: bool=?, ~style: Style.t=?, @@ -69,6 +69,25 @@ external make: ~value: string=?, ~children: React.element=?, // React Native Web Props + ~rel: [@bs.string] [ + | `alternate + | `author + | [@bs.as "dns-prefetch"] `dnsPrefetch + | `icon + | `license + | `next + | `pingback + | `preconnect + | `prefetch + | `preload + | `prerender + | `prev + | `search + | `stylesheet + ] + =?, + ~href: string=?, + ~target: [@bs.string] [ | `_blank | `_self | `_parent | `_top]=? ~onMouseDown: ReactEvent.Mouse.t => unit=?, ~onMouseEnter: ReactEvent.Mouse.t => unit=?, ~onMouseLeave: ReactEvent.Mouse.t => unit=?, diff --git a/src/components/TouchableHighlight.re b/src/components/TouchableHighlight.re index 1ba89a8f4ab3c6..db968a5de64ead 100644 --- a/src/components/TouchableHighlight.re +++ b/src/components/TouchableHighlight.re @@ -53,7 +53,27 @@ external make: ~pressRetentionOffset: View.edgeInsets=?, ~testID: string=?, ~touchSoundDisabled: bool=?, - ~children: React.element=? + ~children: React.element=?, + // escape hatches for react-native web: + ~rel: [@bs.string] [ + | `alternate + | `author + | [@bs.as "dns-prefetch"] `dnsPrefetch + | `icon + | `license + | `next + | `pingback + | `preconnect + | `prefetch + | `preload + | `prerender + | `prev + | `search + | `stylesheet + ] + =?, + ~href: string=?, + ~target: [@bs.string] [ | `_blank | `_self | `_parent | `_top]=? ) => React.element = "TouchableHighlight"; diff --git a/src/components/TouchableNativeFeedback.re b/src/components/TouchableNativeFeedback.re index 8755809a486bad..bde0140c74f2db 100644 --- a/src/components/TouchableNativeFeedback.re +++ b/src/components/TouchableNativeFeedback.re @@ -65,7 +65,27 @@ external make: ~pressRetentionOffset: View.edgeInsets=?, ~testID: string=?, ~touchSoundDisabled: bool=?, - ~children: React.element=? + ~children: React.element=?, + // escape hatches for react-native web: + ~rel: [@bs.string] [ + | `alternate + | `author + | [@bs.as "dns-prefetch"] `dnsPrefetch + | `icon + | `license + | `next + | `pingback + | `preconnect + | `prefetch + | `preload + | `prerender + | `prev + | `search + | `stylesheet + ] + =?, + ~href: string=?, + ~target: [@bs.string] [ | `_blank | `_self | `_parent | `_top]=? ) => React.element = "TouchableNativeFeedback"; diff --git a/src/components/TouchableOpacity.re b/src/components/TouchableOpacity.re index 3532a2a5760473..7f31fae6527a08 100644 --- a/src/components/TouchableOpacity.re +++ b/src/components/TouchableOpacity.re @@ -50,7 +50,27 @@ external make: ~pressRetentionOffset: View.edgeInsets=?, ~testID: string=?, ~touchSoundDisabled: bool=?, - ~children: React.element=? + ~children: React.element=?, + // escape hatches for react-native web: + ~rel: [@bs.string] [ + | `alternate + | `author + | [@bs.as "dns-prefetch"] `dnsPrefetch + | `icon + | `license + | `next + | `pingback + | `preconnect + | `prefetch + | `preload + | `prerender + | `prev + | `search + | `stylesheet + ] + =?, + ~href: string=?, + ~target: [@bs.string] [ | `_blank | `_self | `_parent | `_top]=? ) => React.element = "TouchableOpacity"; diff --git a/src/components/TouchableWithoutFeedback.re b/src/components/TouchableWithoutFeedback.re index fd7c79bde00a90..adee6e907b0adc 100644 --- a/src/components/TouchableWithoutFeedback.re +++ b/src/components/TouchableWithoutFeedback.re @@ -47,7 +47,27 @@ external make: ~pressRetentionOffset: View.edgeInsets=?, ~testID: string=?, ~touchSoundDisabled: bool=?, - ~children: React.element=? + ~children: React.element=?, + // escape hatches for react-native web: + ~rel: [@bs.string] [ + | `alternate + | `author + | [@bs.as "dns-prefetch"] `dnsPrefetch + | `icon + | `license + | `next + | `pingback + | `preconnect + | `prefetch + | `preload + | `prerender + | `prev + | `search + | `stylesheet + ] + =?, + ~href: string=?, + ~target: [@bs.string] [ | `_blank | `_self | `_parent | `_top]=? ) => React.element = "TouchableWithoutFeedback"; diff --git a/src/components/View.re b/src/components/View.re index 0a6e3734b50850..f5edbdef259edd 100644 --- a/src/components/View.re +++ b/src/components/View.re @@ -36,6 +36,16 @@ external make: | `header | `summary | `imagebutton + | `article + | `banner + | `complementary + | `contentinfo + | `form + | `list + | `listitem + | `main + | `navigation + | `region ] =?, ~accessibilityStates: array(AccessibilityState.t)=?,