pub struct ModalProps {
pub id: String,
pub kind: DialogKind,
pub open: Signal<bool>,
pub close: Option<Callback<(), ()>>,
pub title: TextProp,
pub msg: TextProp,
}Expand description
Props for the Modal component.
A modal dialog.
§Required Props
- id:
impl Into<String> - kind:
DialogKind- The kind of dialog to display.
- open:
impl Into<Signal<bool>>- Whether the dialog is open.
- title:
impl Into<TextProp>- The title of the dialog.
- msg:
impl Into<TextProp>- The message of the dialog.
§Optional Props
- close: [
impl Into<Callback<(), ()>>](Callback<(), ()>)- The callback to close the dialog.
Fields§
§id: String§kind: DialogKindThe kind of dialog to display.
open: Signal<bool>Whether the dialog is open.
close: Option<Callback<(), ()>>The callback to close the dialog.
title: TextPropThe title of the dialog.
msg: TextPropThe message of the dialog.
Implementations§
Source§impl ModalProps
impl ModalProps
Sourcepub fn builder() -> ModalPropsBuilder<((), (), (), (), (), ())>
pub fn builder() -> ModalPropsBuilder<((), (), (), (), (), ())>
Create a builder for building ModalProps.
On the builder, call .id(...), .kind(...), .open(...), .close(...)(optional), .title(...), .msg(...) to set the values of the fields.
Finally, call .build() to create the instance of ModalProps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModalProps
impl !RefUnwindSafe for ModalProps
impl !Send for ModalProps
impl !Sync for ModalProps
impl Unpin for ModalProps
impl !UnwindSafe for ModalProps
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more