-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathWarningModal.fs
44 lines (42 loc) · 1.31 KB
/
WarningModal.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
module CustomComponents.WarningModal
open Fable.React
open Fable.React.Props
open Fulma
open Fulma.Extensions.Wikiki
open Fable.FontAwesome
open ExcelColors
open Model
open Messages
open Shared
open CustomComponents
let warningModal (model:Model) dispatch =
let msg = fun e -> model.WarningModal.Value.NextMsg |> dispatch
let closeMsg = fun e -> UpdateWarningModal None |> dispatch
let message = model.WarningModal.Value.ModalMessage
Modal.modal [ Modal.IsActive true ] [
Modal.background [
Props [ OnClick closeMsg ]
] [ ]
Notification.notification [
Notification.Props [Style [MaxWidth "80%"; MaxHeight "80%"; OverflowX OverflowOptions.Auto ]]
] [
Notification.delete [
Props [OnClick closeMsg]
][]
Field.div [][
str message
]
Field.div [][
Button.a [
Button.Color IsWarning
Button.Props [Style [Float FloatOptions.Right]]
Button.OnClick (fun e ->
UpdateWarningModal None |> dispatch
model.WarningModal.Value.NextMsg |> dispatch
)
][
str "Continue"
]
]
]
]