Skip to content

Commit 325b5cb

Browse files
committed
wip
1 parent d56bf55 commit 325b5cb

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

ghcjs/delivery-calculator/src/App/Widgets/Fav.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fav st =
1717
Dialog.dialog
1818
( Dialog.defOpts
1919
& #optsKeyed
20-
.~ "fav"
20+
.~ Just "fav"
2121
)
2222
Dialog.Args
2323
{ Dialog.argsModel = st,

ghcjs/delivery-calculator/src/App/Widgets/Menu.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ menu st =
126126
& #optsTitleIcon
127127
.~ Just Icon.IconSettings
128128
& #optsKeyed
129-
.~ ("menu" :: Unicode)
129+
.~ Just ("menu" :: Unicode)
130130
& #optsTitle
131131
.~ Just "Settings"
132132
)

ghcjs/miso-functora/src/Functora/Miso/Widgets/Dialog.hs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ data Opts model action = Opts
2929
optsFooterRight :: [View action] -> [View action],
3030
optsExtraOnClose :: model -> model,
3131
optsFlexContent :: Bool,
32-
optsKeyed :: Unicode,
32+
optsKeyed :: Maybe Unicode,
3333
optsIcon :: Icon.Icon -> View action
3434
}
3535
deriving stock (Generic)
@@ -45,7 +45,7 @@ defOpts =
4545
optsFooterRight = id,
4646
optsExtraOnClose = id,
4747
optsFlexContent = True,
48-
optsKeyed = mempty,
48+
optsKeyed = Nothing,
4949
optsIcon = Icon.icon @Icon.Fa
5050
}
5151

@@ -58,12 +58,18 @@ dialog opts args =
5858
if not opened
5959
then mempty
6060
else
61-
[ keyed (optsKeyed opts <> "-overlay")
61+
[ maybe
62+
id
63+
(keyed . (<> "-overlay"))
64+
(optsKeyed opts)
6265
$ FixedOverlay.fixedOverlay
6366
[ role_ "button",
6467
onClick $ closeDialogAction opts args
6568
],
66-
keyed (optsKeyed opts <> "-content")
69+
maybe
70+
id
71+
(keyed . (<> "-content"))
72+
(optsKeyed opts)
6773
. nodeHtml "dialog" [boolProp "open" True]
6874
$ Flex.flexLeftRight
6975
header_

0 commit comments

Comments
 (0)