orbital_shell/tokens/
corner_radius.rs1#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
5pub enum CornerRadius {
6 None,
8 Small,
10 Medium,
12 Large,
14 XLarge,
16 Floating,
18 Circle,
20}
21
22impl CornerRadius {
23 pub const fn as_class(self) -> &'static str {
25 match self {
26 Self::None => "orbital-token-radius-none",
27 Self::Small => "orbital-token-radius-small",
28 Self::Medium => "orbital-token-radius-medium",
29 Self::Large => "orbital-token-radius-large",
30 Self::XLarge => "orbital-token-radius-xlarge",
31 Self::Floating => "orbital-token-radius-floating",
32 Self::Circle => "orbital-token-radius-circle",
33 }
34 }
35
36 pub const fn as_token(self) -> &'static str {
38 match self {
39 Self::None => "0",
40 Self::Small => "var(--orb-radius-sm)",
41 Self::Medium => "var(--orb-radius-md)",
42 Self::Large => "var(--orb-radius-lg)",
43 Self::XLarge => "var(--orb-radius-xl)",
44 Self::Floating => "var(--orb-radius-floating)",
45 Self::Circle => "50%",
46 }
47 }
48}