diff options
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 |