Bulma: textarea.
This commit is contained in:
parent
38e519125f
commit
547a22f6dd
@ -170,21 +170,18 @@ txt_name t
|
|||||||
rr_name_style = HP.style "width: 80px;"
|
rr_name_style = HP.style "width: 80px;"
|
||||||
rr_name_text = HH.text t
|
rr_name_text = HH.text t
|
||||||
|
|
||||||
-- | For textareas I don't use Bulma's "textarea" class since it doesn't allow to expand
|
textarea_ :: forall w i. Array HH.ClassName -> String -> String -> (String -> i) -> HH.HTML w i
|
||||||
-- | textareas horizontaly, which makes edition of TXT records painful.
|
textarea_ classes placeholder value action
|
||||||
textarea_classes :: Boolean -> Array HH.ClassName
|
|
||||||
textarea_classes true = C.input <> C.is_small <> C.is_info
|
|
||||||
textarea_classes false = C.input <> C.is_small <> C.is_danger
|
|
||||||
|
|
||||||
textarea :: forall w i. (String -> i) -> String -> Boolean -> HH.HTML w i
|
|
||||||
textarea action value validity
|
|
||||||
= HH.textarea
|
= HH.textarea
|
||||||
[ HE.onValueInput action
|
[ HE.onValueInput action
|
||||||
, HP.value value
|
, HP.value value
|
||||||
, HP.placeholder "target"
|
, HP.placeholder placeholder
|
||||||
, HP.classes $ textarea_classes validity
|
, HP.classes $ C.textarea <> classes
|
||||||
]
|
]
|
||||||
|
|
||||||
|
textarea :: forall w i. String -> String -> (String -> i) -> HH.HTML w i
|
||||||
|
textarea placeholder value action = textarea_ [] placeholder value action
|
||||||
|
|
||||||
btn_modify :: forall w i. i -> HH.HTML w i
|
btn_modify :: forall w i. i -> HH.HTML w i
|
||||||
btn_modify action = btn_ (C.is_small <> C.is_info) "⚒" action
|
btn_modify action = btn_ (C.is_small <> C.is_info) "⚒" action
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user