Pressable_ is now Pressable (to benefit of the full benefit of Pressa… · rescript-react-native/rescript-react-native@421962f

@@ -7,9 +7,14 @@ external rippleConfig:

77

(~color: Color.t=?, ~borderless: bool=?, ~radius: float=?, unit) =>

88

rippleConfig;

9910-

[@deprecated "Please use `Pressable_` instead of `Pressable` to benefit of the full benefit of Pressable component (eg: pressed state in style props and children function). In next major release (0.64), `Pressable_` will become `Pressable`."]

11-

[@react.component]

12-

[@bs.module "react-native"]

10+

type interactionState = {

11+

pressed: bool,

12+

// React Native Web

13+

hovered: option(bool),

14+

focused: option(bool),

15+

};

16+17+

[@react.component] [@bs.module "react-native"]

1318

external make:

1419

(

1520

~ref: ref=?,

@@ -35,21 +40,41 @@ external make:

3540

]

3641

=?,

3742

// Pressable props

38-

~children: React.element=?,

43+

~android_disableSound: bool=?,

44+

~android_ripple: rippleConfig=?,

45+

~children: interactionState => React.element=?,

3946

~delayLongPress: int=?,

4047

~disabled: bool=?,

4148

~hitSlop: View.edgeInsets=?,

42-

~pressRetentionOffset: View.edgeInsets=?,

4349

~onLayout: Event.layoutEvent => unit=?,

4450

~onLongPress: Event.pressEvent => unit=?,

4551

~onPress: Event.pressEvent => unit=?,

4652

~onPressIn: Event.pressEvent => unit=?,

4753

~onPressOut: Event.pressEvent => unit=?,

48-

~style: Style.t=?,

54+

~pressRetentionOffset: View.edgeInsets=?,

55+

~style: interactionState => Style.t=?,

4956

~testID: string=?,

50-

~android_disableSound: bool=?,

51-

~android_ripple: rippleConfig=?,

52-

~testOnly_pressed: bool=?

57+

~testOnly_pressed: bool=?,

58+

// React Native Web Props

59+

~rel: [@bs.string] [

60+

| `alternate

61+

| `author

62+

| [@bs.as "dns-prefetch"] `dnsPrefetch

63+

| `icon

64+

| `license

65+

| `next

66+

| `pingback

67+

| `preconnect

68+

| `prefetch

69+

| `preload

70+

| `prerender

71+

| `prev

72+

| `search

73+

| `stylesheet

74+

]

75+

=?,

76+

~href: string=?,

77+

~target: Web.target=?

5378

) =>

5479

React.element =

5580

"Pressable";