open Brr open Brr_note open Note type Events.kind += | AddPage of { title : Jstr.t } let create : unit -> Events.t = fun () -> (* The element which contains the information *) let input = El.input () ~at:At.[type' (Jstr.v "text")] in let state = S.hold (AddPage { title = Jstr.empty }) @@ Evr.on_el (Ev.input) (fun _ -> AddPage { title = El.prop El.Prop.value input } ) input in ( state , El.div [ El.div ~at:At.[class' (Jstr.v "row")] [ El.div ~at:At.[class' (Jstr.v "col-25")] [ El.label [ El.txt' "Titre"] ~at:[At.for' (Jstr.v "title")] ] ; El.div ~at:At.[class' (Jstr.v "col-75")] [ input ] ] ] )