namespace web_api_cookbook.UI open WebSharper open WebSharper.JavaScript open WebSharper.UI open WebSharper.UI.Client open WebSharper.UI.Html [] module Components = module Button = let plain attrs label = button (attrs @ [attr.``type`` "button"; attr.``class`` "button"]) [ text label ] module InputType = let reset var () = Var.Set var "" let text attrs label = let inputVal = Var.Create "" let input = Doc.InputType.Text attrs inputVal let doc = span [] [text label; input] reset inputVal, inputVal.View, doc