cargo fmt & leptosfmt

This commit is contained in:
luoxiao 2024-09-08 23:07:59 +08:00
parent f9d39f740c
commit 9ffb29c8b2
9 changed files with 15 additions and 29 deletions

View file

@ -3,13 +3,7 @@ use leptos::prelude::*;
#[component]
pub fn ChevronDownRegularIcon() -> impl IntoView {
view! {
<svg
fill="currentColor"
aria-hidden="true"
width="1em"
height="1em"
viewBox="0 0 20 20"
>
<svg fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20">
<path
d="M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z"
fill="currentColor"

View file

@ -51,11 +51,7 @@ pub fn Link(
</a>
})
} else if span {
EitherOf3::B(view! {
<span class=class>
{children()}
</span>
})
EitherOf3::B(view! { <span class=class>{children()}</span> })
} else {
EitherOf3::C(view! {
<button

View file

@ -30,7 +30,9 @@ pub fn NavCategory(
("thaw-nav-category-item--selected", move || is_selected_category.get()),
item_class
]
on:click=move |_| { is_show_group.update(|show| *show = !*show); }
on:click=move |_| {
is_show_group.update(|show| *show = !*show);
}
aria-expanded=move || if is_show_group.get() { "true" } else { "false" }
>
{move || {
@ -74,9 +76,7 @@ pub fn NavCategory(
node_ref=group_ref
style=move || display.get().unwrap_or_default()
>
<Provider value=NavCategoryInjection { value }>
{children()}
</Provider>
<Provider value=NavCategoryInjection { value }>{children()}</Provider>
</div>
</CSSTransition>
}

View file

@ -56,13 +56,11 @@ pub fn Select(
};
view! {
<span
class=class_list![
<span class=class_list![
"thaw-select",
("thaw-select--disabled", move || disabled.get()),
class
]
>
]>
<select
class="thaw-select__select"
id=id

View file

@ -103,9 +103,7 @@ pub fn Slider(
<div class="thaw-slider__rail"></div>
<div class="thaw-slider__thumb"></div>
<OptionComp value=children let:children>
<div class="thaw-slider__datalist">
{children()}
</div>
<div class="thaw-slider__datalist">{children()}</div>
</OptionComp>
</div>
</Provider>

View file

@ -1,6 +1,6 @@
use super::{TagGroupInjection, TagSize};
use leptos::prelude::*;
use thaw_utils::{class_list, mount_style};
use super::{TagSize, TagGroupInjection};
#[component]
pub fn InteractionTag(

View file

@ -1,9 +1,9 @@
mod tag_picker;
mod tag_picker_group;
mod tag_picker_input;
mod tag_picker_option;
mod tag_picker_group;
pub use tag_picker::*;
pub use tag_picker_group::*;
pub use tag_picker_input::*;
pub use tag_picker_option::*;
pub use tag_picker_group::*;