diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2025-06-30 09:13:18 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2025-06-30 09:13:18 +0200 |
commit | 0f509663c78ada3a7d7bbba3da721b99c32ef9e0 (patch) | |
tree | 9d15ae2196803871625e6b9bc490351659bbd90f /js/elements.mli | |
parent | 5ce1244ee92e6681659b3a20288b2c7c2dc6f736 (diff) |
Added a radio-button element and added it with an examplebulma
Diffstat (limited to 'js/elements.mli')
-rw-r--r-- | js/elements.mli | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/js/elements.mli b/js/elements.mli index fcb5588..c2b145b 100644 --- a/js/elements.mli +++ b/js/elements.mli @@ -1,8 +1,32 @@ -val input_field : - ?name:Jstr.t -> - ?id':Jstr.t -> - ?value':Jstr.t -> - label:Jstr.t -> - unit -> - Brr.El.t -(** Create a new input element *) +module Form : sig + (** Fonctions for creating forms elements + + In each function, the element returned by the function is not the field + element. *) + + val input_field : + ?name:Jstr.t -> + ?id':Jstr.t -> + ?value':Jstr.t -> + label:Jstr.t -> + unit -> + Brr.El.t + (** Create a new input element *) + + type choice_value = { + id' : Jstr.t option; + label : Jstr.t; + value : Jstr.t; + checked : bool; + } + (** Values inside a radio button list *) + + val radio : + ?name:Jstr.t -> + ?values:choice_value list -> + label:Jstr.t -> + unit -> + Brr.El.t + + val submit : ?value':Jstr.t -> unit -> Brr.El.t +end |