mirror of
https://github.com/adoyle0/thaw.git
synced 2025-02-02 08:34:15 -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]
|
#[component]
|
||||||
pub fn ChevronDownRegularIcon() -> impl IntoView {
|
pub fn ChevronDownRegularIcon() -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<svg
|
<svg fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20">
|
||||||
fill="currentColor"
|
|
||||||
aria-hidden="true"
|
|
||||||
width="1em"
|
|
||||||
height="1em"
|
|
||||||
viewBox="0 0 20 20"
|
|
||||||
>
|
|
||||||
<path
|
<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"
|
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"
|
fill="currentColor"
|
||||||
|
|
|
@ -51,11 +51,7 @@ pub fn Link(
|
||||||
</a>
|
</a>
|
||||||
})
|
})
|
||||||
} else if span {
|
} else if span {
|
||||||
EitherOf3::B(view! {
|
EitherOf3::B(view! { <span class=class>{children()}</span> })
|
||||||
<span class=class>
|
|
||||||
{children()}
|
|
||||||
</span>
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
EitherOf3::C(view! {
|
EitherOf3::C(view! {
|
||||||
<button
|
<button
|
||||||
|
|
|
@ -30,7 +30,9 @@ pub fn NavCategory(
|
||||||
("thaw-nav-category-item--selected", move || is_selected_category.get()),
|
("thaw-nav-category-item--selected", move || is_selected_category.get()),
|
||||||
item_class
|
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" }
|
aria-expanded=move || if is_show_group.get() { "true" } else { "false" }
|
||||||
>
|
>
|
||||||
{move || {
|
{move || {
|
||||||
|
@ -74,9 +76,7 @@ pub fn NavCategory(
|
||||||
node_ref=group_ref
|
node_ref=group_ref
|
||||||
style=move || display.get().unwrap_or_default()
|
style=move || display.get().unwrap_or_default()
|
||||||
>
|
>
|
||||||
<Provider value=NavCategoryInjection { value }>
|
<Provider value=NavCategoryInjection { value }>{children()}</Provider>
|
||||||
{children()}
|
|
||||||
</Provider>
|
|
||||||
</div>
|
</div>
|
||||||
</CSSTransition>
|
</CSSTransition>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
mod select;
|
mod select;
|
||||||
|
|
||||||
pub use select::*;
|
pub use select::*;
|
||||||
|
|
|
@ -56,13 +56,11 @@ pub fn Select(
|
||||||
};
|
};
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<span
|
<span class=class_list![
|
||||||
class=class_list![
|
"thaw-select",
|
||||||
"thaw-select",
|
|
||||||
("thaw-select--disabled", move || disabled.get()),
|
("thaw-select--disabled", move || disabled.get()),
|
||||||
class
|
class
|
||||||
]
|
]>
|
||||||
>
|
|
||||||
<select
|
<select
|
||||||
class="thaw-select__select"
|
class="thaw-select__select"
|
||||||
id=id
|
id=id
|
||||||
|
|
|
@ -103,9 +103,7 @@ pub fn Slider(
|
||||||
<div class="thaw-slider__rail"></div>
|
<div class="thaw-slider__rail"></div>
|
||||||
<div class="thaw-slider__thumb"></div>
|
<div class="thaw-slider__thumb"></div>
|
||||||
<OptionComp value=children let:children>
|
<OptionComp value=children let:children>
|
||||||
<div class="thaw-slider__datalist">
|
<div class="thaw-slider__datalist">{children()}</div>
|
||||||
{children()}
|
|
||||||
</div>
|
|
||||||
</OptionComp>
|
</OptionComp>
|
||||||
</div>
|
</div>
|
||||||
</Provider>
|
</Provider>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
use super::{TagGroupInjection, TagSize};
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
use thaw_utils::{class_list, mount_style};
|
use thaw_utils::{class_list, mount_style};
|
||||||
use super::{TagSize, TagGroupInjection};
|
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn InteractionTag(
|
pub fn InteractionTag(
|
||||||
|
|
|
@ -31,7 +31,7 @@ pub fn Tag(
|
||||||
size,
|
size,
|
||||||
on_dismiss,
|
on_dismiss,
|
||||||
dismissible,
|
dismissible,
|
||||||
}| {
|
}| {
|
||||||
if value.is_none() {
|
if value.is_none() {
|
||||||
(Some(size), None, None)
|
(Some(size), None, None)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
mod tag_picker;
|
mod tag_picker;
|
||||||
|
mod tag_picker_group;
|
||||||
mod tag_picker_input;
|
mod tag_picker_input;
|
||||||
mod tag_picker_option;
|
mod tag_picker_option;
|
||||||
mod tag_picker_group;
|
|
||||||
|
|
||||||
pub use tag_picker::*;
|
pub use tag_picker::*;
|
||||||
|
pub use tag_picker_group::*;
|
||||||
pub use tag_picker_input::*;
|
pub use tag_picker_input::*;
|
||||||
pub use tag_picker_option::*;
|
pub use tag_picker_option::*;
|
||||||
pub use tag_picker_group::*;
|
|
Loading…
Add table
Reference in a new issue