From 1fc165f2a5a3b6d77da2cfea2aa05e1db1c73577 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 5 Oct 2025 18:27:05 +0200 Subject: feat(form): Re-write the form macro as a proc macro This allows more possibilities. --- src/components/select_placeholder.rs | 93 ++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 src/components/select_placeholder.rs (limited to 'src/components/select_placeholder.rs') diff --git a/src/components/select_placeholder.rs b/src/components/select_placeholder.rs new file mode 100644 index 0000000..947931c --- /dev/null +++ b/src/components/select_placeholder.rs @@ -0,0 +1,93 @@ +use leptos::{ + IntoView, + attr::{AttributeValue, IntoAttributeValue}, + component, + html::Select, + prelude::{ + ClassAttribute, CollectView, ElementChild, GlobalAttributes, NodeRef, NodeRefAttribute, + }, + view, +}; + +use crate::components::get_id; + +#[component] +pub fn SelectPlaceholder( + label: &'static str, + node_ref: NodeRef + {options} + + + // TODO: Reference `var(--tw-border-2)` instead of the `2 px` <2025-10-01> +
+ + +
+ } +} -- cgit 1.4.1