1
0

fix spacing between label an form input

This commit is contained in:
setop 2025-06-25 17:47:02 +02:00
parent c719871d5a
commit 0b1b9f2f4e

View File

@ -98,6 +98,15 @@ renderOption opt =
option [ opt |> Tuple.first |> value ] [ opt |> Tuple.second |> text ]
renderFormInput alabel ainput =
div []
[ label [ style "padding-right" "10px" ] [ text alabel ]
, ainput
, br_
, br_
]
view model =
div []
[ h1 [] [ text "Name Generator 😎" ]
@ -106,22 +115,10 @@ view model =
, br_
, br_
, br_
, text "code"
, input [ onInput InputCode, value model.code ] []
, br_
, br_
, text "region"
, renderSelect InputReg regions
, br_
, br_
, text "environment"
, renderSelect InputEnv envs
, br_
, br_
, text "role"
, renderSelect InputRole roles
, br_
, br_
, text "increment"
, select [ onInput InputIncr ] (List.range 1 20 ++ [ 0 ] |> List.map (String.fromInt >> (\s -> ( s, s )) >> renderOption))
, renderFormInput "code" (input [ onInput InputCode, value model.code ] [])
, renderFormInput "region" (renderSelect InputReg regions)
, renderFormInput "environment" (renderSelect InputEnv envs)
, renderFormInput "role" (renderSelect InputRole roles)
, renderFormInput "increment"
(select [ onInput InputIncr ] (List.range 1 20 ++ [ 0 ] |> List.map (String.fromInt >> (\s -> ( s, s )) >> renderOption)))
]