lucide/packages/leptos/src/squircle_dashed.rs
rust-for-web[bot] 794ad35d9d
feat: update to upstream v0.521.0 (#101)
Co-authored-by: rust-for-web[bot] <191031261+rust-for-web[bot]@users.noreply.github.com>
2025-06-25 09:15:57 +02:00

42 lines
1.6 KiB
Rust

use leptos::{prelude::*, svg::Svg};
#[component]
pub fn SquircleDashed(
#[prop(default = 24.into(), into)] size: Signal<usize>,
#[prop(default = "currentColor".into(), into)] color: Signal<String>,
#[prop(default = "none".into(), into)] fill: Signal<String>,
#[prop(default = 2.into(), into)] stroke_width: Signal<usize>,
#[prop(default = false.into(), into)] absolute_stroke_width: Signal<bool>,
#[prop(optional)] node_ref: NodeRef<Svg>,
) -> impl IntoView {
let stroke_width = Signal::derive(move || {
if absolute_stroke_width.get() {
stroke_width.get() * 24 / size.get()
} else {
stroke_width.get()
}
});
view! {
<svg
node_ref=node_ref
class:lucide=true
xmlns="http://www.w3.org/2000/svg"
width=size
height=size
viewBox="0 0 24 24"
fill=fill
stroke=color
stroke-width=stroke_width
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M13.77 3.043a34 34 0 0 0-3.54 0" />
<path d="M13.771 20.956a33 33 0 0 1-3.541.001" />
<path d="M20.18 17.74c-.51 1.15-1.29 1.93-2.439 2.44" />
<path d="M20.18 6.259c-.51-1.148-1.291-1.929-2.44-2.438" />
<path d="M20.957 10.23a33 33 0 0 1 0 3.54" />
<path d="M3.043 10.23a34 34 0 0 0 .001 3.541" />
<path d="M6.26 20.179c-1.15-.508-1.93-1.29-2.44-2.438" />
<path d="M6.26 3.82c-1.149.51-1.93 1.291-2.44 2.44" />
</svg>
}
}