Silence warnings, run cargo fmt

This commit is contained in:
Evan Carroll 2026-01-18 16:27:31 -06:00
parent fe1c1d3655
commit af1c767f5f
77 changed files with 1904 additions and 903 deletions

View file

@ -295,7 +295,10 @@ pub fn ColorPicker(
/// Color palette component.
#[component]
pub fn ColorPalette(#[prop(into)] value: Signal<String>, on_change: Callback<String>) -> impl IntoView {
pub fn ColorPalette(
#[prop(into)] value: Signal<String>,
on_change: Callback<String>,
) -> impl IntoView {
let colors = [
"#1a1a2e", "#16213e", "#0f3460", "#e94560", "#533483", "#2c3e50", "#1e8449", "#d35400",
];
@ -334,7 +337,10 @@ pub fn ColorPalette(#[prop(into)] value: Signal<String>, on_change: Callback<Str
fn event_target_checked(ev: &leptos::ev::Event) -> bool {
use wasm_bindgen::JsCast;
ev.target()
.and_then(|t| t.dyn_ref::<web_sys::HtmlInputElement>().map(|el| el.checked()))
.and_then(|t| {
t.dyn_ref::<web_sys::HtmlInputElement>()
.map(|el| el.checked())
})
.unwrap_or(false)
}