mirror of
https://github.com/danbulant/lucide
synced 2026-07-06 11:40:38 +00:00
38 lines
1.4 KiB
Rust
38 lines
1.4 KiB
Rust
use leptos::{prelude::*, svg::Svg};
|
|
#[component]
|
|
pub fn TreePalm(
|
|
#[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 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"></path>
|
|
<path d="M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"></path>
|
|
<path d="M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"></path>
|
|
<path d="M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"></path>
|
|
</svg>
|
|
}
|
|
}
|