forked from TheSimpleAIProject/SimpleAI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.rs
More file actions
37 lines (35 loc) · 931 Bytes
/
edit.rs
File metadata and controls
37 lines (35 loc) · 931 Bytes
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
use super::utils::*;
#[derive(Formifiable)]
pub struct Project {
pub name: String,
pub description: String,
}
#[page]
pub fn Edit() -> Element {
let mut proj = Project {
name: "".into(),
description: "".into(),
};
rsx! {
main {
{proj.rsx_edit_form(|e| { debug!("editing {:?}", e) })}
// form {
// LabeledBox {
// name: "name",
// kind: "text",
// required: true,
// placeholder: "SampleProject",
// }
// LabeledBox {
// name: "description",
// kind: "text",
// required: false,
// placeholder: "this is a description",
// }
// section { class: "button-wrapper",
// button { r#type: "submit", NewIcon {} }
// }
// }
}
}
}