Skip to main content

euv_ui/component/doc_layout/view/
struct.rs

1use super::*;
2
3/// Props for the [`euv_doc_layout`] component.
4#[derive(Clone, CustomDebug, Default)]
5pub struct EuvDocLayoutProps {
6    /// The right-column table-of-contents title (e.g. `"On this page"`).
7    pub toc_title: &'static str,
8    /// The right-column table-of-contents items (column hidden when empty).
9    pub toc_items: &'static [EuvTocItem],
10    /// The "previous page" link label (e.g. `"Previous"`).
11    pub prev_label: &'static str,
12    /// The "next page" link label (e.g. `"Next"`).
13    pub next_label: &'static str,
14    /// The previous page entry (skipped when `None`).
15    pub prev: Option<EuvPaginationItem>,
16    /// The next page entry (skipped when `None`).
17    pub next: Option<EuvPaginationItem>,
18    /// The footer text under the pagination (skipped when empty).
19    pub footer: &'static str,
20    /// The destination the footer text points at.
21    ///
22    /// An empty link renders the text as plain, unlinked text.
23    pub footer_link: &'static str,
24    /// The items of the footer under the pagination (skipped when empty).
25    ///
26    /// A filing notice is the canonical use: the number as plain text,
27    /// the official badge as an icon, and the destination pointing at
28    /// the authority's own query page.
29    pub footer_items: &'static [EuvFooterItem],
30    /// The `href` of the TOC entry the reader is currently at.
31    ///
32    /// Passed through to [`euv_toc`] unchanged so a caller that drives
33    /// scroll highlighting writes one signal and the whole right column
34    /// follows. Empty means no entry is highlighted.
35    pub toc_active: Signal<String>,
36}