1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// SYNC: topcoat-ui-registry@0.10.0 sha256:59329070384145eceb1ac54aab6143862415024a10d461892395c11bf927db38 — do not hand-edit. Sync via `cargo xtask sync-topcoat-ui` (ADR-0007).
use ;
use dialog;
/// A dialog that asks the user to respond to an important message.
///
/// Build its content with the dialog components and provide actions for answering or
/// cancelling. It uses `role="alertdialog"` and has the same focus and dismissal
/// requirements as [`dialog`].
///
/// Pass `aria-labelledby` and `aria-describedby` in `attrs`, pointing to the title and
/// description IDs. Other attributes are forwarded to the `<dialog>`.
///
/// ```ignore
/// view! {
/// alert_dialog(
/// open: confirming,
/// dialog_content(
/// dialog_header(
/// dialog_title("Delete this workspace?")
/// dialog_description("Its projects and deploys go with it.")
/// )
/// dialog_footer(
/// <a href="/workspace" class=(button_variants(
/// ButtonVariant::Ghost,
/// ButtonSize::Md,
/// ))>"Keep it"</a>
/// button(variant: ButtonVariant::Destructive, "Delete")
/// )
/// )
/// )
/// }
/// ```
pub async