chore: major cleanup of compiler warnings, unused imports and dead code across all UI components
Some checks failed
Build MIPS Binary / build (push) Failing after 43s

This commit is contained in:
spinline
2026-02-12 23:46:41 +03:00
parent c8139f9338
commit d8ce07001f
10 changed files with 201 additions and 1300 deletions

View File

@@ -1,35 +1,22 @@
use leptos::prelude::*;
use tw_merge::*;
use tailwind_fuse::tw_merge;
#[derive(Clone, Copy, PartialEq, Eq, Default, Debug)]
#[allow(dead_code)]
pub enum SeparatorOrientation { #[default] Horizontal, Vertical }
#[component]
pub fn Separator(
#[prop(into, optional)] orientation: Signal<SeparatorOrientation>,
#[prop(into, optional)] class: String,
// children: Children,
) -> impl IntoView {
let merged_class = Memo::new(move |_| {
let orientation = orientation.get();
let separator = SeparatorClass { orientation };
separator.with_class(class.clone())
});
view! { <div class=merged_class role="separator" /> }
let class = tw_merge!(
"shrink-0 bg-border",
move || match orientation.get() {
SeparatorOrientation::Horizontal => "h-[1px] w-full",
SeparatorOrientation::Vertical => "h-full w-[1px]",
},
class
);
view! { <div class=class role="none" /> }
}
/* ========================================================== */
/* 🧬 STRUCT 🧬 */
/* ========================================================== */
#[derive(TwClass, Default)]
#[tw(class = "shrink-0 bg-border")]
pub struct SeparatorClass {
orientation: SeparatorOrientation,
}
#[derive(TwVariant)]
pub enum SeparatorOrientation {
#[tw(default, class = "w-full h-[1px]")]
Default,
#[tw(class = "h-full w-[1px]")]
Vertical,
}