euv_ui/component/card/view/enum.rs
1use super::*;
2
3/// The heading level a title of the library is rendered at.
4///
5/// A title is a heading, and the level it takes decides where it sits in the
6/// outline of the page. The library cannot know the level a page needs: the
7/// same card is the section of one page and the whole panel of another, so
8/// the level is a setting of the component rather than a fixed part of it.
9///
10/// The level each component takes when the caller names none: the title of a
11/// card is a part of a section, and the title of a result is the title of
12/// the page it stands for. A page that nests the component under a heading
13/// of its own names the level it needs, and the outline of the page stays
14/// free of a skipped level.
15#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16pub enum EuvHeadingLevel {
17 /// A first-level heading, for the title of the page.
18 H1,
19 /// A second-level heading, for the title of a section of the page.
20 H2,
21 /// A third-level heading, for the title of a part of a section.
22 H3,
23 /// A fourth-level heading, for the title of a part of a part.
24 H4,
25 /// A fifth-level heading, for the title of a detail of a part.
26 H5,
27 /// A sixth-level heading, for the title of the deepest named thing.
28 H6,
29}