Bulma: provide remaining signatures.

beta
Philippe Pittoli 2023-07-08 03:47:13 +02:00
parent e4fbe59a3b
commit ed4ac04c28
1 changed files with 13 additions and 4 deletions

View File

@ -280,7 +280,8 @@ btn title action1 action2 validity
true -> HE.onClick \_ -> action1
_ -> HE.onClick \_ -> action2
render_input :: forall w i.
Boolean -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i
render_input password placeholder action value validity cond
= HH.input $
[ HE.onValueInput action
@ -292,14 +293,16 @@ render_input password placeholder action value validity cond
false -> []
true -> [ HP.type_ HP.InputPassword ]
field_inner :: forall w i.
Boolean -> String -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i
field_inner ispassword title placeholder action value validity cond
= div_field
[ div_field_label title
[ div_field_label
, div_field_content $ render_input ispassword placeholder action value validity cond
]
where
div_field = HH.div [ HP.classes (C.field <> C.horizontal) ]
div_field_label title
div_field_label
= HH.div [ HP.classes (C.field_label <> C.normal) ]
[HH.label [ HP.classes C.label ] [ HH.text title ]]
div_field_content content
@ -309,7 +312,11 @@ field_inner ispassword title placeholder action value validity cond
]
]
box_input :: forall w i.
String -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i
box_input = field_inner false
box_password :: forall w i.
String -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i
box_password = field_inner true
section_medium :: forall w i. Array (HH.HTML w i) -> HH.HTML w i
@ -318,6 +325,8 @@ section_medium = HH.section [ HP.classes (C.section <> C.medium) ]
field :: forall w i. Array HH.ClassName -> Array (HH.HTML w i) -> HH.HTML w i
field classes = HH.div [ HP.classes (C.field <> classes) ]
new_domain_field :: forall w i.
(String -> i) -> String -> Array (HP.IProp DHI.HTMLselect i) -> Array String -> HH.HTML w i
new_domain_field inputaction text selectaction accepted_domains
= field C.has_addons
[ HH.p