pub struct DialogProps {
pub id: Option<Cow<'static, str>>,
pub trigger: Option<Markup>,
pub title: Option<Cow<'static, str>>,
pub description: Option<Cow<'static, str>>,
pub footer: Option<Markup>,
pub close_button: bool,
pub close_on_overlay_click: bool,
pub class: Option<Cow<'static, str>>,
pub attrs: AttrMap,
pub children: Children,
}Expand description
Dialog — maps to CSS class .dialog.
Upstream basecoat uses the native <dialog> element with a JS controller
for open/close. The id is required for the controller to find the element.
Fields§
§id: Option<Cow<'static, str>>Unique DOM id — required for the WASM controller.
trigger: Option<Markup>Optional trigger button content.
title: Option<Cow<'static, str>>Dialog title displayed in the <header>.
description: Option<Cow<'static, str>>Dialog description displayed below the title.
Footer HTML content.
Whether to render a close button (default true).
close_on_overlay_click: boolWhether clicking the overlay closes the dialog (default true).
class: Option<Cow<'static, str>>§attrs: AttrMap§children: ChildrenImplementations§
Source§impl DialogProps
impl DialogProps
pub const __BASECOAT_EXTEND_FIELD: Option<&'static str>
Sourcepub fn builder() -> DialogPropsBuilder
pub fn builder() -> DialogPropsBuilder
Create a builder for this prop struct.
Trait Implementations§
Source§impl Clone for DialogProps
impl Clone for DialogProps
Source§fn clone(&self) -> DialogProps
fn clone(&self) -> DialogProps
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DialogProps
impl Debug for DialogProps
Source§impl Default for DialogProps
impl Default for DialogProps
Source§fn default() -> DialogProps
fn default() -> DialogProps
Returns the “default value” for a type. Read more
Source§impl From<DialogPropsBuilder> for DialogProps
impl From<DialogPropsBuilder> for DialogProps
Source§fn from(b: DialogPropsBuilder) -> Self
fn from(b: DialogPropsBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DialogProps
impl RefUnwindSafe for DialogProps
impl Send for DialogProps
impl Sync for DialogProps
impl Unpin for DialogProps
impl UnsafeUnpin for DialogProps
impl UnwindSafe for DialogProps
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