orbital_shell/tokens/
material.rs1#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
5pub enum Material {
6 Solid,
8 Frost,
10 Shell,
12 Scrim,
14}
15
16impl Material {
17 #[allow(non_upper_case_globals)]
18 #[deprecated(note = "Renamed to Frost")]
19 pub const Acrylic: Self = Self::Frost;
20 #[allow(non_upper_case_globals)]
21 #[deprecated(note = "Renamed to Shell")]
22 pub const Mica: Self = Self::Shell;
23 #[allow(non_upper_case_globals)]
24 #[deprecated(note = "Renamed to Scrim")]
25 pub const Smoke: Self = Self::Scrim;
26
27 pub const fn as_class(self) -> &'static str {
28 match self {
29 Self::Solid => "orbital-token-material-solid",
30 Self::Frost => "orbital-token-material-frost",
31 Self::Shell => "orbital-token-material-shell",
32 Self::Scrim => "orbital-token-material-scrim",
33 }
34 }
35
36 pub const fn as_token(self) -> &'static str {
38 match self {
39 Self::Solid => "none",
40 Self::Frost => "saturate(108%) blur(12px)",
41 Self::Shell => "saturate(128%) blur(16px)",
42 Self::Scrim => "none",
43 }
44 }
45}