Skip to main content

euv_ui/component/overlay/
struct.rs

1use super::*;
2
3/// Mounted modal dialog overlay toggled reactively via `open` without unmounting its children.
4#[derive(Clone, Data, Debug, New, Props)]
5pub struct EuvModal {
6    /// Reactive visibility signal.
7    #[get(type(copy))]
8    pub(crate) open: Signal<bool>,
9    /// Dialog heading.
10    pub(crate) title: String,
11    /// Mounted body node rendered inside the modal dialog card.
12    #[get(type(copy))]
13    pub(crate) body: NodeId,
14    /// Active theme tokens.
15    #[get(type(copy))]
16    pub(crate) tokens: ThemeTokens,
17}
18
19/// Floating toast notification banner rendered at `Z_INDEX_TOAST`.
20#[derive(Clone, Data, Debug, New, Props)]
21pub struct EuvToast {
22    /// Reactive visibility signal.
23    #[get(type(copy))]
24    pub(crate) visible: Signal<bool>,
25    /// Notification message text.
26    pub(crate) message: String,
27    /// Semantic tone.
28    #[get(type(copy))]
29    pub(crate) tone: EuvTone,
30    /// Active theme tokens.
31    #[get(type(copy))]
32    pub(crate) tokens: ThemeTokens,
33}