From eacb4c9653df0112e6921f8fa35922284773fec5 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 20 Dec 2024 21:18:31 +0100 Subject: style form --- frontend/app/Form/Input.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'frontend/app/Form') diff --git a/frontend/app/Form/Input.hs b/frontend/app/Form/Input.hs index 3539e96..0b4f1ca 100644 --- a/frontend/app/Form/Input.hs +++ b/frontend/app/Form/Input.hs @@ -120,7 +120,9 @@ inputNumber label = let parse :: MisoString -> Either MisoString Double parse i = let i' = strip i - in if Miso.String.null i' then Left "required" else Right (read (fromMisoString i')) + in if Miso.String.null i' + then Left "required" + else Right (read (fromMisoString i')) in Form { view = \i -> [ div_ [] $ @@ -149,7 +151,7 @@ inputText label = in if Miso.String.null i' then Left "required" else Right i' in Form { view = \i -> - [ div_ [] $ + [ div_ [class_ "input text"] $ [ label_ [] $ [ text label, div_ [] $ @@ -158,7 +160,7 @@ inputText label = value_ i, onInput id ], - div_ [] $ + div_ [ class_ "error-helper" ] $ [either text (\_ -> text "") (parse i)] ] ] -- cgit v1.2.3