Skip to main content

euv_ui/component/icon/view/
struct.rs

1use super::*;
2
3/// Props for the `euv_icon` component.
4///
5/// Defines the strongly-typed interface for a monochrome glyph wrapper. The
6/// `name` prop carries the glyph itself (an emoji or a text symbol) — the
7/// design system has no icon font and no coloured icon set.
8#[derive(Clone, CustomDebug, Default)]
9pub struct EuvIconProps {
10    /// The glyph text rendered as the icon content.
11    pub name: &'static str,
12    /// The accessible label. When empty the icon is treated as decorative.
13    pub label: &'static str,
14    /// The size of the glyph.
15    pub size: EuvIconSize,
16    /// The markup of a glyph drawn as a vector.
17    ///
18    /// The markup is the body of an `svg` element. When it is set the icon
19    /// is drawn as a vector and the `name` is not rendered: a drawing and a
20    /// character cannot share one glyph.
21    pub svg: Option<EuvSvgMarkup>,
22}