objective categorical abstract machine language personal data server
1open Melange_json.Primitives
2open React
3
4type props = {csrf_token: string; error: string option [@default None]}
5[@@deriving json]
6
7let[@react.component] make ~props:({csrf_token; error} : props) () =
8 <main className="w-full h-auto max-w-xs px-4 sm:px-0 my-auto">
9 <h1 className="text-2xl font-serif text-mana-200 mb-2">(string "admin")</h1>
10 <span className="w-full text-balance text-mist-100">
11 (string "Enter the admin password to continue.")
12 </span>
13 <form className="w-full flex flex-col mt-4 mb-2 gap-y-2">
14 <input type_="hidden" name="dream.csrf" value=csrf_token />
15 <Input
16 sr_only=true
17 name="password"
18 type_="password"
19 label="password"
20 autoComplete="current-password"
21 />
22 ( match error with
23 | Some error ->
24 <span className="inline-flex items-center text-phoenix-100 text-sm">
25 <CircleAlertIcon className="w-4 h-4 mr-2" /> (string error)
26 </span>
27 | None ->
28 null )
29 <Button type_="submit" formMethod="post" className="mt-2">
30 (string "sign in")
31 </Button>
32 </form>
33 </main>