Skip to content

Commit 8d0e77a

Browse files
authored
fix Style properties
1 parent e4c666f commit 8d0e77a

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

src/Fable.Helpers.ReactNative.fs

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,13 @@ module Props =
528528
| RenderLoading of (unit -> React.ReactElement)
529529
| ScrollEnabled of bool
530530
| StartInLoadingState of bool
531-
| Style of IStyle list
532531
| Url of string
533532
| Source of U3<WebViewUriSource, WebViewHtmlSource, float>
534533
| MediaPlaybackRequiresUserAction of bool
535534
| ScalesPageToFit of bool
536535
| Ref of Ref<WebView>
537536
interface IWebViewProperties
537+
static member Style (style: IStyle list) : IWebViewProperties = !!("style", keyValueList CaseRules.LowerFirst style)
538538

539539
type ImageURISourceProperties =
540540
| Uri of string
@@ -771,10 +771,10 @@ module Props =
771771
| NumberOfLines of float
772772
| OnLayout of (LayoutChangeEvent -> unit)
773773
| OnPress of (unit -> unit)
774-
| Style of IStyle list
775774
| TestID of string
776775
| Ref of Ref<Text>
777776
interface ITextProperties
777+
static member Style (style: IStyle list) : ITextProperties = !!("style", keyValueList CaseRules.LowerFirst style)
778778

779779
module TextInput =
780780
type TextInputIOSProperties =
@@ -818,11 +818,11 @@ module Props =
818818
| SecureTextEntry of bool
819819
| SelectTextOnFocus of bool
820820
| SelectionColor of string
821-
| Style of IStyle list
822821
| TestID of string
823822
| Value of string
824823
| Ref of Ref<TextInput>
825824
interface ITextInputProperties
825+
static member Style (style: IStyle list) : ITextInputProperties = !!("style", keyValueList CaseRules.LowerFirst style)
826826

827827
module Toolbar =
828828
type ToolbarAndroidProperties =
@@ -834,14 +834,14 @@ module Props =
834834
| OnIconClicked of (unit -> unit)
835835
| OverflowIcon of IImageSource
836836
| Rtl of bool
837-
| Style of IStyle list
838837
| Subtitle of string
839838
| SubtitleColor of string
840839
| TestID of string
841840
| Title of string
842841
| TitleColor of string
843842
| Ref of Ref<ToolbarAndroid>
844843
interface IToolbarAndroidProperties
844+
static member Style (style: IStyle list) : IToolbarAndroidProperties = !!("style", keyValueList CaseRules.LowerFirst style)
845845

846846
type GestureResponderHandlers =
847847
| OnStartShouldSetResponder of (GestureResponderEvent -> bool)
@@ -879,10 +879,10 @@ module Props =
879879
| OnMagicTap of (unit -> unit)
880880
| PointerEvents of PointerEvents
881881
| RemoveClippedSubviews of bool
882-
| Style of IStyle list
883882
| TestID of string
884883
| Ref of Ref<View>
885884
interface IViewProperties
885+
static member Style (style: IStyle list) : IViewProperties = !!("style", keyValueList CaseRules.LowerFirst style)
886886

887887
type ViewPagerAndroidProperties =
888888
| InitialPage of int
@@ -892,9 +892,9 @@ module Props =
892892
| OnPageScrollStateChanged of (ScrollState -> unit)
893893
| KeyboardDismissMode of KeyboardDismissMode
894894
| PageMargin of float
895-
| Style of IStyle list
896895
| Ref of Ref<ViewPagerAndroid>
897896
interface IViewPagerAndroidProperties
897+
static member Style (style: IStyle list) : IViewPagerAndroidProperties = !!("style", keyValueList CaseRules.LowerFirst style)
898898

899899
type KeyboardAvoidingViewProps =
900900
| Behavior of Behavior
@@ -922,18 +922,18 @@ module Props =
922922
| TintColor of string
923923
| TitleTextColor of string
924924
| Translucent of bool
925-
| Style of IStyle list
926925
| Ref of Ref<NavigatorIOS>
926+
static member Style (style: IStyle list) : NavigatorIOSProperties = !!("style", keyValueList CaseRules.LowerFirst style)
927927

928928
module ActivityIndicator =
929929
type ActivityIndicatorProperties =
930930
| Animating of bool
931931
| Color of string
932932
| HidesWhenStopped of bool
933933
| Size of Size
934-
| Style of IStyle list
935934
| Ref of Ref<ActivityIndicator>
936935
interface IViewProperties
936+
static member Style (style: IStyle list) : ActivityIndicatorProperties = !!("style", keyValueList CaseRules.LowerFirst style)
937937

938938

939939
type ActivityIndicatorIOSProperties =
@@ -942,9 +942,9 @@ module Props =
942942
| HidesWhenStopped of bool
943943
| OnLayout of (obj -> unit)
944944
| Size of Size
945-
| Style of IStyle list
946945
| Ref of Ref<ActivityIndicatorIOS>
947946
interface IViewProperties
947+
static member Style (style: IStyle list) : ActivityIndicatorIOSProperties = !!("style", keyValueList CaseRules.LowerFirst style)
948948

949949
type DatePickerIOSProperties =
950950
| Date of DateTime
@@ -984,8 +984,8 @@ module Props =
984984
| TestID of string
985985

986986
type PickerPropertiesIOS<'a> =
987-
| ItemStyle of IStyle list
988987
interface IPickerProperties<'a>
988+
static member Style (style: IStyle list) : IPickerProperties<'a> = !!("style", keyValueList CaseRules.LowerFirst style)
989989

990990
type PickerPropertiesAndroid<'a> =
991991
| Enabled of bool
@@ -996,10 +996,10 @@ module Props =
996996
type PickerProperties<'a> =
997997
| OnValueChange of ('a -> int -> unit)
998998
| SelectedValue of 'a
999-
| Style of IStyle list
1000999
| TestId of string
10011000
| Ref of Ref<Picker>
10021001
interface IPickerProperties<'a>
1002+
static member Style (style: IStyle list) : IPickerProperties<'a> = !!("style", keyValueList CaseRules.LowerFirst style)
10031003

10041004
type PickerIOSProperties<'a> =
10051005
| ItemStyle of ViewStyle list
@@ -1008,17 +1008,16 @@ module Props =
10081008

10091009
module ProgressBar =
10101010
type ProgressBarAndroidProperties =
1011-
| Style of IStyle list
10121011
| StyleAttr of StyleAttr
10131012
| Indeterminate of bool
10141013
| Progress of float
10151014
| Color of string
10161015
| TestID of string
10171016
| Ref of Ref<ProgressBarAndroid>
10181017
interface IProgressBarAndroidProperties
1018+
static member Style (style: IStyle list) : IProgressBarAndroidProperties = !!("style", keyValueList CaseRules.LowerFirst style)
10191019

10201020
type ProgressViewIOSProperties =
1021-
| Style of IStyle list
10221021
| ProgressViewStyle of ProgressViewStyle
10231022
| Progress of float
10241023
| ProgressTintColor of string
@@ -1027,6 +1026,7 @@ module Props =
10271026
| TrackImage of IImageSource
10281027
| Ref of Ref<ProgressViewIOS>
10291028
interface IProgressViewIOSProperties
1029+
static member Style (style: IStyle list) : IProgressBarAndroidProperties = !!("style", keyValueList CaseRules.LowerFirst style)
10301030

10311031
type RefreshControlPropertiesIOS =
10321032
| TintColor of string
@@ -1069,11 +1069,11 @@ module Props =
10691069
| OnSlidingComplete of (float -> unit)
10701070
| OnValueChange of (float -> unit)
10711071
| Step of float
1072-
| Style of IStyle list
10731072
| TestID of string
10741073
| Value of float
10751074
| Ref of Ref<Slider>
10761075
interface ISliderProperties
1076+
static member Style (style: IStyle list) : ISliderProperties = !!("style", keyValueList CaseRules.LowerFirst style)
10771077

10781078
type SwitchProperties =
10791079
| Disabled of bool
@@ -1127,10 +1127,10 @@ module Props =
11271127
| OnError of (ImageErrorEvent -> unit)
11281128
| ResizeMode of ResizeMode
11291129
| Source of IImageSource
1130-
| Style of IStyle list
11311130
| TestID of string
11321131
| Ref of Ref<Image>
11331132
interface IImageProperties
1133+
static member Style (style: IStyle list) : IImageProperties = !!("style", keyValueList CaseRules.LowerFirst style)
11341134

11351135

11361136
type MapViewAnnotation =
@@ -1182,10 +1182,10 @@ module Props =
11821182
| RotateEnabled of bool
11831183
| ScrollEnabled of bool
11841184
| ShowsUserLocation of bool
1185-
| Style of IStyle list
11861185
| ZoomEnabled of bool
11871186
| Ref of Ref<MapView>
11881187
interface IMapViewProperties
1188+
static member Style (style: IStyle list) : IMapViewProperties = !!("style", keyValueList CaseRules.LowerFirst style)
11891189

11901190
type ModalProperties =
11911191
| Animated of bool
@@ -1226,26 +1226,25 @@ module Props =
12261226
| OnPress of (unit -> unit)
12271227
| OnPressIn of (unit -> unit)
12281228
| OnPressOut of (unit -> unit)
1229-
| Style of IStyle list
12301229
| PressRetentionOffset of obj
12311230
| Ref of Ref<TouchableWithoutFeedback>
12321231
interface ITouchableWithoutFeedbackProperties
1232+
static member Style (style: IStyle list) : ITouchableWithoutFeedbackProperties = !!("style", keyValueList CaseRules.LowerFirst style)
12331233

12341234
type TouchableHighlightProperties =
12351235
| ActiveOpacity of float
12361236
| OnHideUnderlay of (unit -> unit)
12371237
| OnShowUnderlay of (unit -> unit)
1238-
| Style of IStyle list
12391238
| UnderlayColor of string
12401239
| Ref of Ref<TouchableHighlight>
12411240
interface ITouchableHighlightProperties
1241+
static member Style (style: IStyle list) : TouchableHighlightProperties = !!("style", keyValueList CaseRules.LowerFirst style)
12421242

12431243
type TouchableOpacityProperties =
12441244
| ActiveOpacity of float
12451245
| Ref of Ref<TouchableOpacity>
12461246
interface ITouchableOpacityProperties
12471247

1248-
12491248
type TouchableNativeFeedbackProperties =
12501249
| Background of obj
12511250
| Ref of Ref<TouchableNativeFeedback>
@@ -1260,7 +1259,7 @@ module Props =
12601259
| Navigator of Navigator
12611260
| RouteMapper of NavigationBarRouteMapper
12621261
| NavState of NavState
1263-
| Style of IStyle list
1262+
static member Style (style: IStyle list) : NavigationBarProperties = !!("style", keyValueList CaseRules.LowerFirst style)
12641263

12651264
type INavigatorProperties =
12661265
interface end
@@ -1285,20 +1284,20 @@ module Props =
12851284
| OnPress of (unit -> unit)
12861285
| Selected of bool
12871286
| SelectedIcon of U2<obj, string>
1288-
| Style of IStyle list
12891287
| SystemIcon of SystemIcon
12901288
| Title of string
12911289
| Ref of Ref<TabBarItemStatic>
12921290
interface IViewProperties
1291+
static member Style (style: IStyle list) : TabBarItemProperties = !!("style", keyValueList CaseRules.LowerFirst style)
12931292

12941293
type TabBarIOSProperties =
12951294
| BarTintColor of string
1296-
| Style of IStyle list
12971295
| TintColor of string
12981296
| Translucent of bool
12991297
| UnselectedTintColor of string
13001298
| Ref of Ref<TabBarIOS>
13011299
interface IViewProperties
1300+
static member Style (style: IStyle list) : TabBarIOSProperties = !!("style", keyValueList CaseRules.LowerFirst style)
13021301

13031302
type IScrollViewPropertiesIOS =
13041303
inherit IScrollViewProperties
@@ -1358,13 +1357,13 @@ module Props =
13581357
| RemoveClippedSubviews of bool
13591358
| ShowsHorizontalScrollIndicator of bool
13601359
| ShowsVerticalScrollIndicator of bool
1361-
| Style of IStyle list
13621360
| ScrollEnabled of bool
13631361
| RefreshControl of React.ReactElement
13641362
| Ref of Ref<ScrollView>
13651363
interface IScrollViewProperties
13661364
interface IFlatListProperties<'a>
13671365
interface ISectionListProperties<'a>
1366+
static member Style (style: IStyle list) : IScrollViewProperties = !!("style", keyValueList CaseRules.LowerFirst style)
13681367

13691368
type ListViewProperties<'a> =
13701369
| DataSource of ListViewDataSource<'a>
@@ -1518,10 +1517,10 @@ module Props =
15181517

15191518
type NavigationAnimatedViewProps =
15201519
| Route of obj
1521-
| Style of IStyle list
15221520
| RenderOverlay of (obj -> React.ReactElement)
15231521
| ApplyAnimation of (obj * obj -> unit)
15241522
| RenderScene of (obj -> React.ReactElement)
1523+
static member Style (style: IStyle list) : NavigationAnimatedViewProps = !!("style", keyValueList CaseRules.LowerFirst style)
15251524

15261525

15271526
type INavigationHeaderProps =
@@ -1540,13 +1539,13 @@ module Props =
15401539

15411540
type NavigationCardStackProps =
15421541
| Direction of Direction
1543-
| Style of IStyle list
15441542
| EnableGestures of bool
15451543
| GestureResponseDistance of float
15461544
| CardStyle of IStyle list
15471545
| RenderHeader of (NavigationTransitionProps -> React.ReactElement)
15481546
| OnNavigateBack of (unit -> unit)
15491547
interface INavigationCardStackProps
1548+
static member Style (style: IStyle list) : NavigationCardStackProps = !!("style", keyValueList CaseRules.LowerFirst style)
15501549

15511550
type IBreadcrumbNavigationBarProperties =
15521551
interface end
@@ -1555,8 +1554,8 @@ module Props =
15551554
| Navigator of Navigator
15561555
| RouteMapper of NavigatorStatic.BreadcrumbNavigationBarRouteMapper
15571556
| NavState of NavState
1558-
| Style of IStyle list
15591557
interface IBreadcrumbNavigationBarProperties
1558+
static member Style (style: IStyle list) : IBreadcrumbNavigationBarProperties = !!("style", keyValueList CaseRules.LowerFirst style)
15601559

15611560
type CommonProps<'a> =
15621561
| Key of string

0 commit comments

Comments
 (0)