diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-02T13·23+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-02T13·23+0100 |
commit | 803db7a5b2f1b8fadda45efce56d6c31a74a1e08 (patch) | |
tree | 9bd7f6b14686f9b30d2f59d992dd0bcb7b114f42 /client/src/UI.elm | |
parent | 699892883ceaffb64e0d9b9aaab67313a60a5428 (diff) |
Support printing user's itinerary
- Define print.css with media=print type (note: could've been handled with @media queries) - Define printPage port to interop with window.print() JS function - Support UI.wrapNoPrint to wrap components with a the no-print CSS
Diffstat (limited to 'client/src/UI.elm')
-rw-r--r-- | client/src/UI.elm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/UI.elm b/client/src/UI.elm index f96dcd8b5cc3..f959b0cc7836 100644 --- a/client/src/UI.elm +++ b/client/src/UI.elm @@ -310,3 +310,8 @@ datePicker { mDate, prompt, prefix, picker, onUpdate } = in div [ [ "w-1/2", "py-4", "mx-auto" ] |> Tailwind.use |> class ] [ DatePicker.view mDate settings picker |> Html.map onUpdate ] + + +wrapNoPrint : Html State.Msg -> Html State.Msg +wrapNoPrint component = + div [ [ "no-print" ] |> Tailwind.use |> class ] [ component ] |