Skip to content

Commit d09c397

Browse files
committed
feat: bring maskedViewIOS component.
1 parent 01b9403 commit d09c397

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed

src/components/maskedViewIOS.re

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[@bs.module "react-native"]
2+
external view : ReasonReact.reactClass = "MaskedViewIOS";
3+
4+
let make =
5+
(
6+
~maskElement: ReasonReact.reactElement,
7+
~accessible=?,
8+
~accessibilityLabel=?,
9+
~accessibilityComponentType=?,
10+
~accessibilityTraits=?,
11+
~onAccessibilityTap=?,
12+
~hitSlop=?,
13+
~onLayout=?,
14+
~onMagicTap=?,
15+
~responderHandlers=?,
16+
~pointerEvents=?,
17+
~removeClippedSubviews=?,
18+
~style=?,
19+
~testID=?,
20+
~accessibilityLiveRegion=?,
21+
~collapsable=?,
22+
~importantForAccessibility=?,
23+
~needsOffscreenAlphaCompositing=?,
24+
~renderToHardwareTextureAndroid=?,
25+
~accessibilityViewIsModal=?,
26+
~shouldRasterizeIOS=?,
27+
) =>
28+
ReasonReact.wrapJsForReason(
29+
~reactClass=view,
30+
~props=
31+
Props.extendView(
32+
~accessibilityLabel?,
33+
~accessible?,
34+
~hitSlop?,
35+
~onAccessibilityTap?,
36+
~onLayout?,
37+
~onMagicTap?,
38+
~responderHandlers?,
39+
~pointerEvents?,
40+
~removeClippedSubviews?,
41+
~style?,
42+
~testID?,
43+
~accessibilityComponentType?,
44+
~accessibilityLiveRegion?,
45+
~collapsable?,
46+
~importantForAccessibility?,
47+
~needsOffscreenAlphaCompositing?,
48+
~renderToHardwareTextureAndroid?,
49+
~accessibilityTraits?,
50+
~accessibilityViewIsModal?,
51+
~shouldRasterizeIOS?,
52+
{"maskElement": maskElement},
53+
),
54+
);

src/components/maskedViewIOS.rei

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
let make:
2+
(
3+
~maskElement: ReasonReact.reactElement,
4+
~accessible: bool=?,
5+
~accessibilityLabel: string=?,
6+
~accessibilityComponentType: [
7+
| `button
8+
| `none
9+
| `radiobutton_checked
10+
| `radiobutton_unchecked
11+
]
12+
=?,
13+
~accessibilityTraits: list(
14+
[<
15+
| `adjustable
16+
| `allowsDirectInteraction
17+
| `button
18+
| `disabled
19+
| `frequentUpdates
20+
| `header
21+
| `image
22+
| `key
23+
| `link
24+
| `none
25+
| `pageTurn
26+
| `plays
27+
| `search
28+
| `selected
29+
| `startsMedia
30+
| `summary
31+
| `text
32+
],
33+
)
34+
=?,
35+
~onAccessibilityTap: unit => unit=?,
36+
~hitSlop: Types.insets=?,
37+
~onLayout: RNEvent.NativeLayoutEvent.t => unit=?,
38+
~onMagicTap: unit => unit=?,
39+
~responderHandlers: Types.touchResponderHandlers=?,
40+
~pointerEvents: [ | `auto | `boxNone | `boxOnly | `none]=?,
41+
~removeClippedSubviews: bool=?,
42+
~style: Style.t=?,
43+
~testID: string=?,
44+
~accessibilityLiveRegion: [ | `assertive | `none | `polite]=?,
45+
~collapsable: bool=?,
46+
~importantForAccessibility: [ | `auto | `no | `noHideDescendants | `yes]=?,
47+
~needsOffscreenAlphaCompositing: bool=?,
48+
~renderToHardwareTextureAndroid: bool=?,
49+
~accessibilityViewIsModal: bool=?,
50+
~shouldRasterizeIOS: bool=?,
51+
array(ReasonReact.reactElement)
52+
) =>
53+
ReasonReact.component(
54+
ReasonReact.stateless,
55+
ReasonReact.noRetainedProps,
56+
ReasonReact.actionless,
57+
);

0 commit comments

Comments
 (0)