lucide_dioxus/
mail_search.rs1use dioxus::prelude::*;
2#[derive(Clone, PartialEq, Props)]
3pub struct MailSearchProps {
4 #[props(default = 24)]
5 pub size: usize,
6 #[props(default = "currentColor".to_owned())]
7 pub color: String,
8 #[props(default = "none".to_owned())]
9 pub fill: String,
10 #[props(default = 2)]
11 pub stroke_width: usize,
12 #[props(default = false)]
13 pub absolute_stroke_width: bool,
14 pub class: Option<String>,
15}
16#[component]
17pub fn MailSearch(props: MailSearchProps) -> Element {
18 let stroke_width = if props.absolute_stroke_width {
19 props.stroke_width * 24 / props.size
20 } else {
21 props.stroke_width
22 };
23 rsx! {
24 svg {
25 "xmlns": "http://www.w3.org/2000/svg",
26 "class": if let Some(class) = props.class { "{class}" },
27 "width": "{props.size}",
28 "height": "{props.size}",
29 "viewBox": "0 0 24 24",
30 "fill": "{props.fill}",
31 "stroke": "{props.color}",
32 "stroke-width": "{stroke_width}",
33 "stroke-linecap": "round",
34 "stroke-linejoin": "round",
35 path { "d": "M22 12.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h7.5" }
36 path { "d": "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" }
37 path { "d": "M18 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" }
38 circle { "cx": "18", "cy": "18", "r": "3" }
39 path { "d": "m22 22-1.5-1.5" }
40 }
41 }
42}