mirror of
https://github.com/danbulant/lucide
synced 2026-06-20 06:51:09 +00:00
66 lines
2.2 KiB
Rust
66 lines
2.2 KiB
Rust
use yew::prelude::*;
|
|
#[derive(PartialEq, Properties)]
|
|
pub struct WheatProps {
|
|
#[prop_or(24)]
|
|
pub size: usize,
|
|
#[prop_or(AttrValue::from("currentColor"))]
|
|
pub color: AttrValue,
|
|
#[prop_or(AttrValue::from("none"))]
|
|
pub fill: AttrValue,
|
|
#[prop_or(2)]
|
|
pub stroke_width: usize,
|
|
#[prop_or(false)]
|
|
pub absolute_stroke_width: bool,
|
|
#[prop_or_default]
|
|
pub class: Classes,
|
|
#[prop_or_default]
|
|
pub style: std::option::Option<AttrValue>,
|
|
#[prop_or_default]
|
|
pub node_ref: NodeRef,
|
|
}
|
|
#[function_component]
|
|
pub fn Wheat(props: &WheatProps) -> Html {
|
|
let stroke_width = if props.absolute_stroke_width {
|
|
props.stroke_width * 24 / props.size
|
|
} else {
|
|
props.stroke_width
|
|
};
|
|
html! {
|
|
<svg
|
|
ref={props.node_ref.clone()}
|
|
class={classes!("lucide", props.class
|
|
.clone())}
|
|
style={props.style.clone()}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
width={props.size.to_string()}
|
|
height={props.size.to_string()}
|
|
viewBox="0 0 24 24"
|
|
fill={& props.fill}
|
|
stroke={& props.color}
|
|
stroke-width={stroke_width.to_string()}
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<path d="M2 22 16 8" />
|
|
<path
|
|
d="M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z"
|
|
/>
|
|
<path
|
|
d="M7.47 8.53 9 7l1.53 1.53a3.5 3.5 0 0 1 0 4.94L9 15l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z"
|
|
/>
|
|
<path
|
|
d="M11.47 4.53 13 3l1.53 1.53a3.5 3.5 0 0 1 0 4.94L13 11l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z"
|
|
/>
|
|
<path d="M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z" />
|
|
<path
|
|
d="M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z"
|
|
/>
|
|
<path
|
|
d="M15.47 13.47 17 15l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z"
|
|
/>
|
|
<path
|
|
d="M19.47 9.47 21 11l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L13 11l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z"
|
|
/>
|
|
</svg>
|
|
}
|
|
}
|