zuicon_mdl2/
eye_shadow.rs1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct EyeShadow {}
10
11#[derive(Properties, Debug, Clone, PartialEq, Eq)]
12pub struct Props {
13 #[prop_or_default]
14 pub class: Option<&'static str>,
15
16 #[prop_or_default]
17 pub width: Option<&'static str>,
18
19 #[prop_or_default]
20 pub height: Option<&'static str>,
21
22 #[prop_or_default]
23 pub color: Option<&'static str>,
24
25 #[prop_or_default]
26 pub fill: Option<&'static str>,
27
28 #[prop_or_default]
29 pub spin: bool,
30
31 #[prop_or_default]
32 pub rotate: i16,
33}
34
35impl Component for EyeShadow {
36 type Properties = Props;
37 type Message = ();
38
39 fn create(_ctx: &Context<Self>) -> Self {
40 Self {}
41 }
42
43 fn view(&self, ctx: &Context<Self>) -> Html {
44 let props = ctx.props();
45 let mut style = String::new();
47 if props.rotate != 0 {
48 style += &format!("transform: rotate({}deg);", props.rotate);
49 }
50 html! {
51 <svg
52 xmlns={ "http://www.w3.org/2000/svg" }
53 class={ props.class.unwrap_or("") }
54 width={ props.width.unwrap_or("16") }
55 height={ props.height.unwrap_or("16") }
56 focusable={ "false" }
57 data-icon={ "EyeShadow" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path d="M1305 896h743v1024H0V896h771q75-91 154-176t162-168q31-31 86-84t122-114 143-124 148-114 135-83 107-33q41 0 66 25t26 67q0 35-21 82t-56 103-82 116-98 122-104 119-101 108-88 90-65 64zm-412 54q25 11 45 31t32 46q57-47 128-113t149-142 156-158 148-164 126-157 91-141q-64 34-140 90t-158 126-163 148-159 156-142 149-113 129zm-101 107q-24 0-57 7t-69 18-74 27-72 33-62 36-45 37q-16 17-22 36t-7 42q0 44 21 87t56 78 78 56 88 22q23 0 42-6t36-23q18-17 36-44t36-62 33-72 27-74 19-69 7-58q0-41-15-56t-56-15zm1128 735v-768h-752q-45 40-89 78t-92 77q-5 45-23 104t-45 118-59 111-65 85q-35 35-78 51t-92 16q-71 0-137-31t-118-83-83-118-31-138q0-54 17-94t48-72 69-56 83-48H128v768h1792zm-768-384q0-53 20-99t55-82 81-55 100-20q53 0 99 20t82 55 55 81 20 100q0 53-20 99t-55 82-81 55-100 20q-53 0-99-20t-82-55-55-81-20-100zm256-128q-27 0-50 10t-40 27-28 41-10 50q0 27 10 50t27 40 41 28 50 10q27 0 50-10t40-27 28-41 10-50q0-27-10-50t-27-40-41-28-50-10z" />
63 </svg>
64 }
65 }
66}