Skip to content

Commit e3a3a06

Browse files
sgnyMoOx
authored andcommitted
Add zero-cost bindings for the ImageBackground component (#367)
* Add zero-cost bindings for the ImageBackground component * Add imageRef prop
1 parent 87eba0d commit e3a3a06

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
type element;
2+
type ref = React.Ref.t(Js.nullable(element));
3+
4+
type t;
5+
6+
[@bs.obj]
7+
external style:
8+
(
9+
~backfaceVisibility: [@bs.string] [ | `visible | `hidden ]=?,
10+
~backgroundColor: Style.color=?,
11+
~borderColor: Style.color=?,
12+
~borderRadius: float=?,
13+
~borderBottomLeftRadius: float=?,
14+
~borderBottomRightRadius: float=?,
15+
~borderTopLeftRadius: float=?,
16+
~borderTopRightRadius: float=?,
17+
~borderWidth: float=?,
18+
~opacity: float=?,
19+
~overflow: [@bs.string] [ | `visible | `hidden ]=?,
20+
~resizeMode: [@bs.string] [ | `cover | `contain | `stretch | `repeat | `center ]=?,
21+
~overlayColor: Style.color=?,
22+
~tintColor: Style.color=?,
23+
unit
24+
) =>
25+
t =
26+
"";
27+
28+
[@react.component] [@bs.module "react-native"]
29+
external make:
30+
(
31+
~imageRef: ref=?,
32+
~onLayout: Event.NativeLayoutEvent.t => unit=?,
33+
~onLoad: unit => unit=?,
34+
~onLoadEnd: unit => unit=?,
35+
~onLoadStart: unit => unit=?,
36+
~resizeMode: [@bs.string] [
37+
| `center
38+
| `contain
39+
| `cover
40+
| `repeat
41+
| `stretch
42+
]
43+
=?,
44+
~source: Image.Source.t,
45+
~style: Style.t=?,
46+
~imageStyle: t=?,
47+
~testID: string=?,
48+
~resizeMethod: [@bs.string] [ | `auto | `resize | `scale]=?,
49+
~accessibilityLabel: string=?,
50+
~accessible: bool=?,
51+
~blurRadius: float=?,
52+
~capInsets: Types.insets=?,
53+
~defaultSource: Image.DefaultSource.t=?,
54+
~onPartialLoad: unit => unit=?,
55+
~onProgress: Image.progress => unit=?,
56+
~fadeDuration: float=?,
57+
~progressiveRenderingEnabled: bool=?,
58+
~children: React.element=?
59+
) =>
60+
React.element =
61+
"ImageBackground";

0 commit comments

Comments
 (0)