Bulma select.

beta
Philippe Pittoli 2023-07-01 17:32:15 +02:00
parent 81bdec302c
commit 8fe25f8aca
2 changed files with 12 additions and 1 deletions

View File

@ -235,7 +235,7 @@ render {
list_acceptable_domains list_acceptable_domains
= [ Bulma.h3 "Acceptable domains:" = [ Bulma.h3 "Acceptable domains:"
, HH.ul_ $ map (\domain -> HH.li_ [ HH.text domain ]) accepted_domains , Bulma.select $ map Bulma.option accepted_domains
] ]
list_of_own_domains list_of_own_domains

View File

@ -31,6 +31,10 @@ class_label :: Array (HH.ClassName)
class_label = [HH.ClassName "label" ] class_label = [HH.ClassName "label" ]
class_control :: Array (HH.ClassName) class_control :: Array (HH.ClassName)
class_control = [HH.ClassName "control" ] class_control = [HH.ClassName "control" ]
class_select :: Array (HH.ClassName)
class_select = [HH.ClassName "select" ]
class_primary :: Array (HH.ClassName)
class_primary = [HH.ClassName "is-primary" ]
columns :: forall (w :: Type) (i :: Type). columns :: forall (w :: Type) (i :: Type).
@ -329,3 +333,10 @@ p str = HH.p_ [ HH.text str ]
box :: forall w i. Array (HH.HTML w i) -> HH.HTML w i box :: forall w i. Array (HH.HTML w i) -> HH.HTML w i
box = HH.div [HP.classes class_box] box = HH.div [HP.classes class_box]
option :: forall w i. String -> HH.HTML w i
option value = HH.option_ [HH.text value]
select :: forall w i. Array (HH.HTML w i) -> HH.HTML w i
select options = HH.div [HP.classes (class_select <> class_primary)]
[ HH.select_ options]