Skip to content

Commit 6b94129

Browse files
committed
Update code to fable 2
1 parent f01e6b4 commit 6b94129

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

src/Nightwatch.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Program.mkProgram App.init App.update App.view
2323
#if RELEASE
2424
#else
2525
|> Program.withConsoleTrace
26-
|> Program.withHMR
2726
#endif
2827
|> Program.withReactNative "nightwatch"
2928
|> Program.run

src/Scenes/CheckLocation.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ let view (model:Model) (dispatch: Msg -> unit) =
8686
match model.PictureUri with
8787
| Some uri ->
8888
image
89-
[ Source [ Uri uri; IsStatic true]
89+
[ Source (localImage uri)
9090
ImageProperties.Style [
9191
ImageStyle.BorderColor "#000000"
9292
FlexStyle.Flex 3.
@@ -104,11 +104,11 @@ let view (model:Model) (dispatch: Msg -> unit) =
104104

105105
view [ Styles.sceneBackground ]
106106
[ text [ Styles.defaultText ] model.LocationCheckRequest.Name
107-
textInput [
107+
textInputWithChild [
108108
TextInput.TextInputProperties.AutoCorrect false
109109
TextInput.TextInputProperties.Style [
110-
FlexStyle.MarginTop 2.
111-
FlexStyle.MarginBottom 2.
110+
FlexStyle.MarginTop (unbox 2.)
111+
FlexStyle.MarginBottom (unbox 2.)
112112
TextStyle.Color Styles.textColor
113113
ViewStyle.BackgroundColor Styles.inputBackgroundColor
114114
]

src/Scenes/LocationList.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ let view (model:Model) (dispatch: Msg -> unit) =
6868
image
6969
[ Source uri
7070
ImageProperties.Style [
71-
FlexStyle.Width 24.
72-
FlexStyle.Height 24.
71+
FlexStyle.Width (unbox 24.)
72+
FlexStyle.Height (unbox 24.)
7373
FlexStyle.AlignSelf Alignment.Center
7474
]
7575
])
@@ -86,8 +86,8 @@ let view (model:Model) (dispatch: Msg -> unit) =
8686

8787
flatList model.Requests [
8888
InitialNumToRender 20
89-
KeyExtractor (Func<_,_,_>(fun (i,_) _ -> i.ToString()))
90-
RenderItem (Func<_,_>(fun v -> renderItem v.item))
89+
KeyExtractor (fun (i,_) _ -> i.ToString())
90+
RenderItem (fun v -> renderItem v.item)
9191
]
9292
Styles.button "OK" (fun () -> dispatch GoBack)
9393
]

src/Styles.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let renderText fontSize =
3333
TextProperties.Style [
3434
TextStyle.Color textColor
3535
TextStyle.TextAlign TextAlignment.Center
36-
FlexStyle.Margin 3.
36+
FlexStyle.Margin (unbox 3.)
3737
TextStyle.FontSize fontSize
3838
]
3939

@@ -47,7 +47,7 @@ let whitespace<'a> = text [ smallText ] ""
4747
let sceneBackground<'a> =
4848
ViewProperties.Style [
4949
FlexStyle.AlignSelf Alignment.Stretch
50-
FlexStyle.Padding 20.
50+
FlexStyle.Padding (unbox 20.)
5151
ViewStyle.ShadowColor shadowColor
5252
ViewStyle.ShadowOpacity 0.8
5353
ViewStyle.ShadowRadius 3.
@@ -59,7 +59,7 @@ let sceneBackground<'a> =
5959
let viewPagerBackground<'a> =
6060
ViewPagerAndroidProperties.Style [
6161
FlexStyle.AlignSelf Alignment.Stretch
62-
FlexStyle.Padding 20.
62+
FlexStyle.Padding (unbox 20.)
6363
ViewStyle.ShadowColor shadowColor
6464
ViewStyle.ShadowOpacity 0.8
6565
ViewStyle.ShadowRadius 3.

0 commit comments

Comments
 (0)