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 `href` of the TOC entry the reader is currently at.
21    ///
22    /// Passed through to [`euv_toc`] unchanged so a caller that drives
23    /// scroll highlighting writes one signal and the whole right column
24    /// follows. Empty means no entry is highlighted.
25    pub toc_active: Signal<String>,
26}