1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//ui/button/props.rs
use dioxus::prelude::*;

#[derive(PartialEq, Props, Clone)]
pub struct ButtonProps {
    #[props(default)]
    pub class: String,

    #[props(default)]
    pub variant: ButtonVariants,

    #[props(default)]
    pub size: ButtonSize,
    #[props(default = "".to_string())]
    pub text: String,
}

#[derive(PartialEq, Clone)]
pub enum ButtonVariants {
    Default,
    _Secondary,
    _Destructive,
    _Outline,
    _Ghost,
    _Link,
    // Additional variants can be added here.
}

impl Default for ButtonVariants {
    fn default() -> Self {
        ButtonVariants::Default
    }
}

#[derive(PartialEq, Clone)]
pub enum ButtonSize {
    Default,
    _SM,
    _LG,
    _ICON,
}

impl Default for ButtonSize {
    fn default() -> Self {
        ButtonSize::Default
    }
}