Skip to content

Commit

Permalink
AnchoredOverlay: Support sheet toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Dec 12, 2023
1 parent 77faa66 commit 557e0ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/UI/AnchoredOverlay.elm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ withSheet sheet_ anchoredOverlay_ =
{ anchoredOverlay_ | sheet = OpenSheet sheet_ }


withSheet_ : Bool -> Sheet msg -> AnchoredOverlay msg -> AnchoredOverlay msg
withSheet_ isOpen sheet_ anchoredOverlay_ =
if isOpen then
{ anchoredOverlay_ | sheet = OpenSheet sheet_ }

else
{ anchoredOverlay_ | sheet = Closed }


withSheetPosition : Position -> AnchoredOverlay msg -> AnchoredOverlay msg
withSheetPosition position anchoredOverlay_ =
{ anchoredOverlay_ | sheetPosition = position }
Expand Down

0 comments on commit 557e0ee

Please sign in to comment.