lucide/packages/leptos/src/umbrella_off.rs
rust-for-web[bot] a6a5028c22
feat: update to upstream v0.540.0 (#140)
Co-authored-by: rust-for-web[bot] <191031261+rust-for-web[bot]@users.noreply.github.com>
2025-08-18 18:48:44 +02:00

39 lines
1.3 KiB
Rust

use leptos::{prelude::*, svg::Svg};
#[component]
pub fn UmbrellaOff(
#[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="M12 13v7a2 2 0 0 0 4 0" />
<path d="M12 2v2" />
<path d="M18.656 13h2.336a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-12.07-7.51" />
<path d="m2 2 20 20" />
<path d="M5.961 5.957a10.28 10.28 0 0 0-3.922 5.769A1 1 0 0 0 3 13h10" />
</svg>
}
}