Updates to client

This commit is contained in:
2025-05-01 22:21:51 -04:00
parent 4f976fb7af
commit e9b914c88b
16 changed files with 205 additions and 22 deletions

View File

@@ -0,0 +1,27 @@
use dioxus::prelude::*;
#[derive(PartialEq, Clone, Props)]
pub struct InputProps {
pub r#type: Option<String>,
pub value: Option<String>,
pub label: Option<String>,
pub placeholder: Option<String>,
pub name: String,
}
#[component]
pub fn Input(props: InputProps) -> Element {
let label = props.label.unwrap_or("".into());
let ph = props.placeholder.unwrap_or(label.clone());
rsx! {
label {
"{label}",
input {
type : props.r#type.unwrap_or("text".into()),
value: props.value,
name: props.name,
placeholder:ph
}
}
}
}