euv_ui/component/alert/view/struct.rs
1use super::*;
2
3/// Props for the `euv_alert` component.
4///
5/// Defines the strongly-typed interface for an alert with variant styling.
6#[derive(Clone, CustomDebug, Data, Default, New)]
7pub struct EuvAlertProps {
8 /// The visual variant of the alert (success or error).
9 #[get(type(copy))]
10 pub variant: AlertVariant,
11}
12
13/// Props of the [`euv_alert_icon`] component.
14///
15/// The icon is the glyph the alert leads with.
16#[derive(Clone, CustomDebug, Default)]
17pub struct EuvAlertIconProps {
18 /// The glyph shown inside the icon.
19 pub glyph: ::euv::CowText,
20}
21
22/// Props for the `euv_alert_title` component.
23///
24/// The title names the alert; the text is the fallback used when the
25/// title is given no children.
26#[derive(Clone, CustomDebug, Data, Default, New)]
27pub struct EuvAlertTitleProps {
28 /// The title text.
29 pub text: ::euv::CowText,
30}
31
32/// Props for the `euv_alert_description` component.
33///
34/// The description explains the alert; the text is the fallback used when
35/// the description is given no children.
36#[derive(Clone, CustomDebug, Data, Default, New)]
37pub struct EuvAlertDescriptionProps {
38 /// The description text.
39 pub text: ::euv::CowText,
40}
41
42/// Props for the `euv_alert_action` component.
43///
44/// The action holds the control that acts on the alert, so it takes no
45/// settings of its own.
46#[derive(Clone, CustomDebug, Default)]
47pub struct EuvAlertActionProps {}