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/mod.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/components/mod.rs') diff --git a/src/components/mod.rs b/src/components/mod.rs index f7b8dba..1ee37d5 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -1,9 +1,12 @@ +use std::sync::atomic::{AtomicU32, Ordering}; + // Generic pub mod async_fetch; pub mod container; +pub mod form; pub mod icon_p; pub mod input_placeholder; -pub mod form; +pub mod select_placeholder; // Specific pub mod buy; @@ -11,3 +14,9 @@ pub mod inventory; pub mod product_overview; pub mod recipies; pub mod site_header; + +fn get_id() -> u32 { + static ID: AtomicU32 = AtomicU32::new(0); + + ID.fetch_add(1, Ordering::Relaxed) +} -- cgit 1.4.1