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
//ui/input/props.rs
use dioxus::prelude::*;

#[derive(PartialEq, Props, Clone)]
pub struct InputProps {
    #[props(default)]
    pub class: String,
    #[props(default)]
    pub variant: InputVariants,
    #[props(default)]
    pub size: InputSize,
    #[props(default = "Type something...".to_string())]
    pub placeholder: String,
}

#[derive(PartialEq, Clone)]
pub enum InputVariants {
    Default,
    _Outline,
    _Underline,
    _Flushed,
    _Filled,
}

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

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

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