Skip to content

Commit

Permalink
小细节。
Browse files Browse the repository at this point in the history
  • Loading branch information
kalxd committed Nov 21, 2023
1 parent 036bb04 commit 8df2782
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions site/src/page/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ import * as m from "mithril";
import { Button } from "drifloon/element/button";
import { Header } from "drifloon/element/header";
import { Color, Size } from "drifloon/data/var";
import { alertText, confirmAsync, modal, ResolveConfirmAttr, ResolveModalAttr } from "drifloon/module/modal";
import {
alertText,
confirmAsync,
confirmText,
modal,
ResolveConfirmAttr,
ResolveModalAttr
} from "drifloon/module/modal";
import { Modal, ModalAttr } from "drifloon/widget/modal";
import { Maybe } from "purify-ts";

Expand Down Expand Up @@ -33,8 +40,8 @@ const AlertModalHere: m.Component<ResolveModalAttr<Maybe<void>>> = {
};

return m(Modal, modalAttr, [
m(Button, { connectClick: () => console.log("你看见我了") }, "alert"),
m(Button, { connectClick: () => console.info("你看见我了") }, "confirm")
m(Button, { connectClick: () => alertText("你看见我了") }, "alert"),
m(Button, { connectClick: () => confirmText("你看见我了") }, "confirm")
]);
}
};
Expand Down

0 comments on commit 8df2782

Please sign in to comment.