mirror of
https://github.com/danbulant/lucide
synced 2026-06-24 01:01:53 +00:00
39 lines
1.4 KiB
Rust
39 lines
1.4 KiB
Rust
use leptos::{prelude::*, svg::Svg};
|
|
#[component]
|
|
pub fn PackageX(
|
|
#[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="M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14" />
|
|
<path d="m7.5 4.27 9 5.15" />
|
|
<polyline points="3.29 7 12 12 20.71 7" />
|
|
<line x1="12" x2="12" y1="22" y2="12" />
|
|
<path d="m17 13 5 5m-5 0 5-5" />
|
|
</svg>
|
|
}
|
|
}
|