Silence warnings, run cargo fmt
This commit is contained in:
parent
fe1c1d3655
commit
af1c767f5f
77 changed files with 1904 additions and 903 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue