mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-22 14:09:21 -05:00
cargo fmt & leptosfmt
This commit is contained in:
parent
f9d39f740c
commit
9ffb29c8b2
9 changed files with 15 additions and 29 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
mod select;
|
||||
|
||||
pub use select::*;
|
||||
pub use select::*;
|
||||
|
|
|
@ -56,13 +56,11 @@ pub fn Select(
|
|||
};
|
||||
|
||||
view! {
|
||||
<span
|
||||
class=class_list![
|
||||
"thaw-select",
|
||||
<span class=class_list![
|
||||
"thaw-select",
|
||||
("thaw-select--disabled", move || disabled.get()),
|
||||
class
|
||||
]
|
||||
>
|
||||
]>
|
||||
<select
|
||||
class="thaw-select__select"
|
||||
id=id
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -31,7 +31,7 @@ pub fn Tag(
|
|||
size,
|
||||
on_dismiss,
|
||||
dismissible,
|
||||
}| {
|
||||
}| {
|
||||
if value.is_none() {
|
||||
(Some(size), None, None)
|
||||
} else {
|
||||
|
|
|
@ -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::*;
|
Loading…
Add table
Reference in a new issue