UNPKG

@authduo/authduo

Version:

Free User-sovereign Authentication for the World

30 lines (28 loc) 968 B
import { html, shadowView } from "@benev/slate"; import stylesCss from "./styles.css.js"; import themeCss from "../../../../common/theme.css.js"; import { PassportEditor } from "../../common/passport-editor/view.js"; export const CreatePage = shadowView(use => (situation) => { use.styles([themeCss, stylesCss]); const passport = use.signal(situation.passport); function save() { if (passport.value) situation.onComplete(passport.value); } return html ` <div class=plate> <header> <h2 class=instruction>Create a new passport</h2> </header> ${PassportEditor([{ passport: situation.passport, onUpdate: updated => passport.value = updated, }])} <footer class=buttonbar> <button @click="${situation.onCancel}">Cancel</button> <button class=happy ?disabled="${!passport.value}" @click="${save}">Create</button> </footer> </div> `; }); //# sourceMappingURL=view.js.map