refactor: rename the project form component

This commit is contained in:
2024-08-17 10:59:43 +02:00
parent 8d461527b5
commit 0b74ca80bf
3 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
use dioxus::core_macro::{component, rsx};
use dioxus::dioxus_core::Element;
use dioxus::prelude::*;
#[component]
pub(crate) fn ProjectForm(onsubmit: EventHandler<String>) -> Element {
rsx! {
form {
onsubmit: move |event| {
onsubmit(event.values().get("title").unwrap().as_value());
},
input {
r#type: "text",
name: "title",
placeholder: "title"
}
button {
r#type: "submit",
"create"
}
}
}
}