dioxus_bootstrap/
size.rs

1//! No components here, just a generic size type used to modify components.
2
3/// Standard sized used by Bootstrap.
4#[derive(Clone, Copy, Default, PartialEq)]
5pub enum Size {
6    Small,
7    Large,
8    #[default]
9    Normal,
10}
11
12impl Into<&'static str> for Size {
13    fn into(self) -> &'static str {
14        match self {
15            Size::Large => "lg",
16            Size::Small => "sm",
17            _ => ""
18        }
19    }
20}
21
22#[derive(Clone, Copy, Default, PartialEq)]
23pub enum ExtendedSize {
24    XS,
25    Small,
26    Medium,
27    Large,
28    XL,
29    XXL,
30    #[default]
31    Normal,
32    Fluid,
33}
34
35impl Into<&'static str> for ExtendedSize {
36    fn into(self) -> &'static str {
37        match self {
38            ExtendedSize::XS => "xs",
39            ExtendedSize::Small => "sm",
40            ExtendedSize::Medium => "md",
41            ExtendedSize::Large => "lg",
42            ExtendedSize::XL => "xl",
43            ExtendedSize::XXL => "xxl",
44            ExtendedSize::Fluid => "fluid",
45            _ => ""
46        }
47    }
48}