pub struct ModalCardProps {
pub class: Class,
pub active_class: Class,
pub title_class: Class,
pub close_class: Class,
pub on_close: Option<EventHandler<MouseEvent>>,
pub visible: bool,
pub size: SharedString,
pub title: SharedString,
/* private fields */
}
Expand description
The ModalCard
properties struct for the configuration of the component.
Fields§
§class: Class
The class attribute for the component.
active_class: Class
A class to apply when the modal is visible.
title_class: Class
§close_class: Class
A class to apply to the close
button element.
on_close: Option<EventHandler<MouseEvent>>
An event handler to be called when the close
button is clicked.
visible: bool
A flag to determine whether the modal is visible or not.
size: SharedString
The size of the modal: small
| normal
| medium
| large
.
title: SharedString
The title in the modal header.
Implementations§
Source§impl ModalCardProps
impl ModalCardProps
Sourcepub fn builder() -> ModalCardPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> ModalCardPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building ModalCardProps
.
On the builder, call .class(...)
(optional), .active_class(...)
(optional), .title_class(...)
(optional), .close_class(...)
(optional), .on_close(...)
(optional), .visible(...)
(optional), .size(...)
(optional), .title(...)
, .children(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ModalCardProps
.
Trait Implementations§
Source§impl Clone for ModalCardProps
impl Clone for ModalCardProps
Source§fn clone(&self) -> ModalCardProps
fn clone(&self) -> ModalCardProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more