mirror of
https://github.com/danbulant/lucide
synced 2026-07-06 11:40:38 +00:00
42 lines
1.5 KiB
Rust
42 lines
1.5 KiB
Rust
use leptos::{prelude::*, svg::Svg};
|
|
#[component]
|
|
pub fn Drama(
|
|
#[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="M10 11h.01" />
|
|
<path d="M14 6h.01" />
|
|
<path d="M18 6h.01" />
|
|
<path d="M6.5 13.1h.01" />
|
|
<path d="M22 5c0 9-4 12-6 12s-6-3-6-12c0-2 2-3 6-3s6 1 6 3" />
|
|
<path d="M17.4 9.9c-.8.8-2 .8-2.8 0" />
|
|
<path d="M10.1 7.1C9 7.2 7.7 7.7 6 8.6c-3.5 2-4.7 3.9-3.7 5.6 4.5 7.8 9.5 8.4 11.2 7.4.9-.5 1.9-2.1 1.9-4.7" />
|
|
<path d="M9.1 16.5c.3-1.1 1.4-1.7 2.4-1.4" />
|
|
</svg>
|
|
}
|
|
}
|