From 803db7a5b2f1b8fadda45efce56d6c31a74a1e08 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sun, 2 Aug 2020 14:23:38 +0100 Subject: 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 --- client/src/UI.elm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/src/UI.elm') 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 ] -- cgit 1.4.1