Skip to main content

euv_ui/component/footer/view/
struct.rs

1use super::*;
2
3/// One item of the footer row.
4///
5/// The text is the notice itself — a filing number, plain and
6/// selectable — while the optional icon is the official badge the
7/// filing authority publishes, served by the site itself.
8#[derive(Clone, Copy, CustomDebug, Data, Default, New)]
9pub struct EuvFooterItem {
10    /// The link text.
11    #[get(type(copy))]
12    pub text: &'static str,
13    /// The destination the link points at.
14    #[get(type(copy))]
15    pub link: &'static str,
16    /// An optional image rendered before the text; empty renders no image.
17    #[get(type(copy))]
18    pub icon: &'static str,
19    /// The accessible name of the icon image.
20    #[get(type(copy))]
21    pub alt: &'static str,
22}
23
24/// Props for the [`euv_footer`] component.
25#[derive(Clone, Copy, CustomDebug, Data, Default, New)]
26pub struct EuvFooterProps {
27    /// The plain text of the footer (for example the license line).
28    ///
29    /// An empty text renders no text row, which is how a footer that
30    /// carries nothing but its items is written.
31    #[get(type(copy))]
32    pub text: &'static str,
33    /// The destination the text points at.
34    ///
35    /// An empty link renders the text as plain, unlinked text.
36    #[get(type(copy))]
37    pub link: &'static str,
38    /// The items of the footer row, in display order.
39    #[get(type(copy))]
40    pub items: &'static [EuvFooterItem],
41}