Skip to main content

euv_ui/component/link/view/
struct.rs

1use super::*;
2
3/// Props for the [`euv_link`] component.
4///
5/// Defines the strongly-typed interface for a link: the text, the
6/// destination it points at, and whether it is currently disabled.
7#[derive(Clone, CustomDebug, Default)]
8pub struct EuvLinkProps {
9    /// The link text.
10    pub text: &'static str,
11    /// The destination the link points at.
12    ///
13    /// An empty string renders the link as a plain span with no
14    /// destination — the shape a disabled or in-page action takes.
15    pub href: &'static str,
16    /// Whether the link is disabled.
17    pub disabled: bool,
18    /// The callback fired when the link is taken.
19    #[debug(skip)]
20    pub on_click: Option<Rc<dyn Fn(Event)>>,
21}