euv_ui/component/empty/view/struct.rs
1use super::*;
2
3/// Props for the [`euv_empty`] component.
4///
5/// Defines the strongly-typed interface for an empty state: the glyph
6/// that marks the emptiness, the headline, the explanation, and an
7/// optional action that offers the reader a way out of it.
8#[derive(Clone, CustomDebug, Default)]
9pub struct EuvEmptyProps {
10 /// The optional glyph shown above the headline (skipped when empty).
11 pub icon: &'static str,
12 /// The headline naming what is missing.
13 pub title: &'static str,
14 /// The optional explanation under the headline (skipped when empty).
15 pub desc: &'static str,
16 /// The optional action label (skipped when empty).
17 pub action_label: &'static str,
18 /// The callback fired when the action is taken.
19 #[debug(skip)]
20 pub on_action: Option<Rc<dyn Fn(Event)>>,
21}