euv_ui/component/form/
struct.rs1use super::*;
2
3#[derive(Clone, CustomDebug, Data, New, Props)]
5pub struct EuvInput {
6 #[get(type(copy))]
8 pub(crate) value: Signal<String>,
9 pub(crate) placeholder: String,
11 #[new(skip)]
13 #[get(type(copy))]
14 #[prop(custom)]
15 pub(crate) password: bool,
16 #[new(skip)]
18 #[get(type(copy))]
19 #[prop(custom)]
20 pub(crate) disabled: bool,
21 #[new(skip)]
23 #[get(type(copy))]
24 #[prop(custom)]
25 pub(crate) borderless: bool,
26 #[get(type(copy))]
28 pub(crate) tokens: ThemeTokens,
29}
30
31#[derive(Clone, Data, Debug, New, Props)]
33pub struct EuvField {
34 pub(crate) label: String,
36 #[new(skip)]
38 #[prop(custom)]
39 pub(crate) error: String,
40 #[get(type(copy))]
42 pub(crate) control: NodeId,
43 #[get(type(copy))]
45 pub(crate) tokens: ThemeTokens,
46}
47
48#[derive(Clone, Data, Debug, New, Props)]
50pub struct EuvSwitch {
51 #[get(type(copy))]
53 pub(crate) checked: Signal<bool>,
54 pub(crate) label: String,
56 #[get(type(copy))]
58 pub(crate) tokens: ThemeTokens,
59}
60
61#[derive(Clone, Data, Debug, New, Props)]
63pub struct EuvCheckbox {
64 #[get(type(copy))]
66 pub(crate) checked: Signal<bool>,
67 pub(crate) label: String,
69 #[get(type(copy))]
71 pub(crate) tokens: ThemeTokens,
72}
73
74#[derive(Clone, Data, Debug, New, Props)]
76pub struct EuvSegmented {
77 pub(crate) options: Vec<String>,
79 #[get(type(copy))]
81 pub(crate) selected: Signal<usize>,
82 #[get(type(copy))]
84 pub(crate) tokens: ThemeTokens,
85}