1
1
open ReactNative ;
2
- open ReactNative . Style ;
2
+
3
+ type size = Style . size ;
3
4
type sizes = array (size );
4
5
type opacity = string ;
5
6
external opacity : float => size = "% identity " ;
@@ -8,7 +9,7 @@ external opacity: float => size = "%identity";
8
9
module SvgXml = {
9
10
[@ react . component ] [@ bs . module "react-native-svg" ]
10
11
external make :
11
- (~xml : string , ~width : size =?, ~height : size =?, ~style : t =?) =>
12
+ (~xml : string , ~width : size =?, ~height : size =?, ~style : Style . t =?) =>
12
13
React . element =
13
14
"SvgXml" ;
14
15
};
@@ -17,7 +18,7 @@ module SvgXml = {
17
18
module SvgCss = {
18
19
[@ react . component ] [@ bs . module "react-native-svg" ]
19
20
external make :
20
- (~xml : string , ~width : size =?, ~height : size =?, ~style : t =?) =>
21
+ (~xml : string , ~width : size =?, ~height : size =?, ~style : Style . t =?) =>
21
22
React . element =
22
23
"SvgCss" ;
23
24
};
@@ -37,13 +38,13 @@ module Svg = {
37
38
(
38
39
~color : Color . t =?,
39
40
~viewBox : string =?,
40
- ~opacity : size =?,
41
+ ~opacity : float =?,
41
42
~onLayout : unit => unit =?,
42
43
~preserveAspectRatio : string =?,
43
- ~style : t =?,
44
+ ~style : Style . t =?,
44
45
~width : size =?,
45
46
~height : size =?,
46
- ~children : React . element ,
47
+ ~children : React . element =? ,
47
48
// Commons Props
48
49
~id : string =?,
49
50
~fill : Color . t =?,
@@ -62,7 +63,6 @@ module Svg = {
62
63
~transform : string =?,
63
64
~vectorEffect : [@ bs . string ] [
64
65
| ` none
65
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
66
66
| ` nonScalingStroke
67
67
| ` default
68
68
| [@ bs . as "inherit" ] `_inherit
@@ -90,7 +90,7 @@ module Rect = {
90
90
~rx : size =?,
91
91
~ry : size =?,
92
92
~opacity : opacity =?,
93
- ~children : React . element ,
93
+ ~children : React . element =? ,
94
94
// Commons Props
95
95
~id : string =?,
96
96
~fill : Color . t =?,
@@ -109,7 +109,6 @@ module Rect = {
109
109
~transform : string =?,
110
110
~vectorEffect : [@ bs . string ] [
111
111
| ` none
112
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
113
112
| ` nonScalingStroke
114
113
| ` default
115
114
| [@ bs . as "inherit" ] `_inherit
@@ -136,7 +135,7 @@ module Circle = {
136
135
~cy : size =?,
137
136
~r : size =?,
138
137
~opacity : opacity =?,
139
- ~children : React . element ,
138
+ ~children : React . element =? ,
140
139
// Commons Props
141
140
~id : string =?,
142
141
~fill : Color . t =?,
@@ -155,7 +154,6 @@ module Circle = {
155
154
~transform : string =?,
156
155
~vectorEffect : [@ bs . string ] [
157
156
| ` none
158
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
159
157
| ` nonScalingStroke
160
158
| ` default
161
159
| [@ bs . as "inherit" ] `_inherit
@@ -183,7 +181,7 @@ module Ellipse = {
183
181
~rx : size =?,
184
182
~ry : size =?,
185
183
~opacity : opacity =?,
186
- ~children : React . element ,
184
+ ~children : React . element =? ,
187
185
// Commons Props
188
186
~id : string =?,
189
187
~fill : Color . t =?,
@@ -202,7 +200,6 @@ module Ellipse = {
202
200
~transform : string =?,
203
201
~vectorEffect : [@ bs . string ] [
204
202
| ` none
205
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
206
203
| ` nonScalingStroke
207
204
| ` default
208
205
| [@ bs . as "inherit" ] `_inherit
@@ -230,7 +227,7 @@ module Line = {
230
227
~x2 : size =?,
231
228
~y2 : size =?,
232
229
~opacity : opacity =?,
233
- ~children : React . element ,
230
+ ~children : React . element =? ,
234
231
// Commons Props
235
232
~id : string =?,
236
233
~fill : Color . t =?,
@@ -249,7 +246,6 @@ module Line = {
249
246
~transform : string =?,
250
247
~vectorEffect : [@ bs . string ] [
251
248
| ` none
252
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
253
249
| ` nonScalingStroke
254
250
| ` default
255
251
| [@ bs . as "inherit" ] `_inherit
@@ -274,7 +270,7 @@ module Polygon = {
274
270
(
275
271
~points : string =?,
276
272
~opacity : opacity =?,
277
- ~children : React . element ,
273
+ ~children : React . element =? ,
278
274
// Commons Props
279
275
~id : string =?,
280
276
~fill : Color . t =?,
@@ -293,7 +289,6 @@ module Polygon = {
293
289
~transform : string =?,
294
290
~vectorEffect : [@ bs . string ] [
295
291
| ` none
296
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
297
292
| ` nonScalingStroke
298
293
| ` default
299
294
| [@ bs . as "inherit" ] `_inherit
@@ -318,7 +313,7 @@ module Polyline = {
318
313
(
319
314
~points : string =?,
320
315
~opacity : opacity =?,
321
- ~children : React . element ,
316
+ ~children : React . element =? ,
322
317
// Commons Props
323
318
~id : string =?,
324
319
~fill : Color . t =?,
@@ -337,7 +332,6 @@ module Polyline = {
337
332
~transform : string =?,
338
333
~vectorEffect : [@ bs . string ] [
339
334
| ` none
340
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
341
335
| ` nonScalingStroke
342
336
| ` default
343
337
| [@ bs . as "inherit" ] `_inherit
@@ -362,7 +356,7 @@ module Path = {
362
356
(
363
357
~d : string =?,
364
358
~opacity : opacity =?,
365
- ~children : React . element ,
359
+ ~children : React . element =? ,
366
360
// Commons Props
367
361
~id : string =?,
368
362
~fill : Color . t =?,
@@ -381,7 +375,6 @@ module Path = {
381
375
~transform : string =?,
382
376
~vectorEffect : [@ bs . string ] [
383
377
| ` none
384
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
385
378
| ` nonScalingStroke
386
379
| ` default
387
380
| [@ bs . as "inherit" ] `_inherit
@@ -409,7 +402,7 @@ module Text = {
409
402
~rotate : size =?,
410
403
~inlineSize : size =?,
411
404
~opacity : opacity =?,
412
- ~children : React . element ,
405
+ ~children : React . element =? ,
413
406
// Text props
414
407
~alignmentBaseline : [@ bs . string ] [
415
408
| ` baseline
@@ -504,7 +497,6 @@ module Text = {
504
497
~transform : string =?,
505
498
~vectorEffect : [@ bs . string ] [
506
499
| ` none
507
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
508
500
| ` nonScalingStroke
509
501
| ` default
510
502
| [@ bs . as "inherit" ] `_inherit
@@ -533,7 +525,7 @@ module TextPath = {
533
525
~method : [@ bs . string ] [ | ` align | ` stretch ] =?,
534
526
~spacing : [@ bs . string ] [ | ` auto | ` exact ] =?,
535
527
~midLine : [@ bs . string ] [ | ` sharp | ` smooth ] =?,
536
- ~children : React . element ,
528
+ ~children : React . element =? ,
537
529
// Text props
538
530
~alignmentBaseline : [@ bs . string ] [
539
531
| ` baseline
@@ -628,7 +620,6 @@ module TextPath = {
628
620
~transform : string =?,
629
621
~vectorEffect : [@ bs . string ] [
630
622
| ` none
631
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
632
623
| ` nonScalingStroke
633
624
| ` default
634
625
| [@ bs . as "inherit" ] `_inherit
@@ -655,7 +646,7 @@ module Tspan = {
655
646
~dy : string =?,
656
647
~rotate : string =?,
657
648
~inlineSize : size =?,
658
- ~children : React . element ,
649
+ ~children : React . element =? ,
659
650
// Font Props
660
651
~fontStyle : [@ bs . string ] [ | ` normal | ` italic | ` oblique ] =?,
661
652
~fontVariant : [@ bs . string ] [ | ` normal | ` smallcaps ] =?,
@@ -724,7 +715,6 @@ module Tspan = {
724
715
~transform : string =?,
725
716
~vectorEffect : [@ bs . string ] [
726
717
| ` none
727
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
728
718
| ` nonScalingStroke
729
719
| ` default
730
720
| [@ bs . as "inherit" ] `_inherit
@@ -752,7 +742,7 @@ module Use = {
752
742
~width : size =?,
753
743
~height : size =?,
754
744
~opacity : opacity =?,
755
- ~children : React . element ,
745
+ ~children : React . element =? ,
756
746
// Commons Props
757
747
~id : string =?,
758
748
~fill : Color . t =?,
@@ -771,7 +761,6 @@ module Use = {
771
761
~transform : string =?,
772
762
~vectorEffect : [@ bs . string ] [
773
763
| ` none
774
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
775
764
| ` nonScalingStroke
776
765
| ` default
777
766
| [@ bs . as "inherit" ] `_inherit
@@ -795,7 +784,7 @@ module G = {
795
784
external make :
796
785
(
797
786
~opacity : opacity =?,
798
- ~children : React . element ,
787
+ ~children : React . element =? ,
799
788
// Commons Props
800
789
~id : string =?,
801
790
~fill : Color . t =?,
@@ -814,7 +803,6 @@ module G = {
814
803
~transform : string =?,
815
804
~vectorEffect : [@ bs . string ] [
816
805
| ` none
817
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
818
806
| ` nonScalingStroke
819
807
| ` default
820
808
| [@ bs . as "inherit" ] `_inherit
@@ -861,7 +849,7 @@ module Image = {
861
849
~height : size =?,
862
850
~preserveAspectRatio : string =?,
863
851
~opacity : opacity =?,
864
- ~children : React . element ,
852
+ ~children : React . element =? ,
865
853
// Commons Props
866
854
~id : string =?,
867
855
~fill : Color . t =?,
@@ -880,7 +868,6 @@ module Image = {
880
868
~transform : string =?,
881
869
~vectorEffect : [@ bs . string ] [
882
870
| ` none
883
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
884
871
| ` nonScalingStroke
885
872
| ` default
886
873
| [@ bs . as "inherit" ] `_inherit
@@ -974,7 +961,6 @@ module Mask = {
974
961
~transform : string =?,
975
962
~vectorEffect : [@ bs . string ] [
976
963
| ` none
977
- | [@ bs . as "non-scaling-stroke" ] ` nonScalingStroke
978
964
| ` nonScalingStroke
979
965
| ` default
980
966
| [@ bs . as "inherit" ] `_inherit
0 commit comments