diff --git a/src/App/DNSManagerDomainsInterface.purs b/src/App/DNSManagerDomainsInterface.purs index 59b7e95..014b905 100644 --- a/src/App/DNSManagerDomainsInterface.purs +++ b/src/App/DNSManagerDomainsInterface.purs @@ -235,7 +235,7 @@ render { list_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 diff --git a/src/Bulma.purs b/src/Bulma.purs index 11d5066..7536a96 100644 --- a/src/Bulma.purs +++ b/src/Bulma.purs @@ -31,6 +31,10 @@ class_label :: Array (HH.ClassName) class_label = [HH.ClassName "label" ] class_control :: Array (HH.ClassName) 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). @@ -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 = 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]