pub struct AlertDialogProps<'__a> {
pub open: Expr<bool>,
pub attrs: Attributes,
pub child: Child<'__a>,
}Expand description
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>.
ⓘ
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")
)
)
)
}Fields§
§open: Expr<bool>Whether the alert dialog shows.
attrs: AttributesExtra attributes for the <dialog> element.
child: Child<'__a>The alert dialog’s content.
Implementations§
Source§impl<'__a> AlertDialogProps<'__a>
impl<'__a> AlertDialogProps<'__a>
Sourcepub fn builder() -> AlertDialogPropsBuilder<'__a, open>
pub fn builder() -> AlertDialogPropsBuilder<'__a, open>
Returns a AlertDialogPropsBuilder with no properties set.
Trait Implementations§
Auto Trait Implementations§
impl<'__a> !RefUnwindSafe for AlertDialogProps<'__a>
impl<'__a> !Sync for AlertDialogProps<'__a>
impl<'__a> !UnwindSafe for AlertDialogProps<'__a>
impl<'__a> Freeze for AlertDialogProps<'__a>
impl<'__a> Send for AlertDialogProps<'__a>
impl<'__a> Unpin for AlertDialogProps<'__a>
impl<'__a> UnsafeUnpin for AlertDialogProps<'__a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more