mirror of
https://github.com/danbulant/lucide
synced 2026-06-20 15:01:15 +00:00
37 lines
1.3 KiB
Rust
37 lines
1.3 KiB
Rust
use leptos::{prelude::*, svg::Svg};
|
|
#[component]
|
|
pub fn ShieldPlus(
|
|
#[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="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"></path>
|
|
<path d="M9 12h6"></path>
|
|
<path d="M12 9v6"></path>
|
|
</svg>
|
|
}
|
|
}
|