From a86ec831063ea71bc1b5f15abf887ac03a54502d Mon Sep 17 00:00:00 2001 From: luoxiaozero <48741584+luoxiaozero@users.noreply.github.com> Date: Sun, 25 Feb 2024 23:23:53 +0800 Subject: [PATCH] feat: cargo fmt and check (#120) --- thaw/src/button/mod.rs | 1 + thaw/src/icon/mod.rs | 3 +- thaw/src/message/message_provider.rs | 2 +- thaw/src/modal/mod.rs | 18 ++++------ thaw/src/radio/mod.rs | 4 +-- thaw/src/radio/radio_item.rs | 5 +-- thaw/src/utils/use_click_position.rs | 53 ++++++++++++++-------------- 7 files changed, 38 insertions(+), 48 deletions(-) diff --git a/thaw/src/button/mod.rs b/thaw/src/button/mod.rs index 9d20214..925379b 100644 --- a/thaw/src/button/mod.rs +++ b/thaw/src/button/mod.rs @@ -234,6 +234,7 @@ pub fn Button( style=move || { format!("{}{}", css_vars.get(), style.as_ref().map(|s| s.get()).unwrap_or_default()) } + disabled=move || disabled.get() on:click=on_click > diff --git a/thaw/src/icon/mod.rs b/thaw/src/icon/mod.rs index d8c78ec..1229f9f 100644 --- a/thaw/src/icon/mod.rs +++ b/thaw/src/icon/mod.rs @@ -84,8 +84,7 @@ pub fn Icon( stroke=move || take(icon_stroke) fill=move || take(icon_fill) inner_html=move || take(icon_data) - > - + > } } diff --git a/thaw/src/message/message_provider.rs b/thaw/src/message/message_provider.rs index 0fd7b46..1b364e1 100644 --- a/thaw/src/message/message_provider.rs +++ b/thaw/src/message/message_provider.rs @@ -1,10 +1,10 @@ -use std::time::Duration; use super::{message_environment::MessageEnvironment, MessageVariant}; use crate::{ components::Teleport, utils::{class_list::class_list, mount_style}, }; use leptos::*; +use std::time::Duration; use uuid::Uuid; #[derive(Default, Clone)] diff --git a/thaw/src/modal/mod.rs b/thaw/src/modal/mod.rs index 0c0ed61..67c3030 100644 --- a/thaw/src/modal/mod.rs +++ b/thaw/src/modal/mod.rs @@ -80,23 +80,17 @@ pub fn Modal( on_enter let:display > -