euv_ui/component/button/view/enum.rs
1use super::*;
2
3/// The visual variant of the `euv_button` component.
4///
5/// The variants are the ones the registry publishes: a filled default, a
6/// quiet secondary, a destructive fill, an outlined box, a borderless
7/// ghost and a text link.
8///
9/// `Primary` is the historical name of the filled default and is kept
10/// because callers across the workspace name it; `Default` is the
11/// registry's own name for the same treatment.
12#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
13pub enum EuvButtonVariant {
14 /// The filled default button.
15 #[default]
16 Primary,
17 /// The registry's name for the filled default button.
18 Default,
19 /// A quiet button on the secondary surface.
20 Secondary,
21 /// A button that destroys what it acts on.
22 Destructive,
23 /// An outlined button on the background surface.
24 Outline,
25 /// A borderless button that fills on hover.
26 Ghost,
27 /// A text button that reads as a link.
28 Link,
29}
30
31/// The sizes mirror the registry: extra-small, small, default and large
32/// controls, plus square icons in extra-small, small, default and large sizes.
33#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
34pub enum EuvButtonSize {
35 /// The default control size.
36 #[default]
37 Default,
38 /// The small control size.
39 Small,
40 /// The large control size.
41 Large,
42 /// The square default icon size.
43 Icon,
44 /// The extra-small control size.
45 ExtraSmall,
46 /// The extra-small square icon size.
47 IconExtraSmall,
48 /// The small square icon size.
49 IconSmall,
50 /// The large square icon size.
51 IconLarge,
52}