zuicon_mdl2/
machine_learning.rs1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct MachineLearning {}
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 MachineLearning {
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={ "MachineLearning" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path d="M1968 1095q38 36 59 84t21 101q0 53-20 99t-55 82-81 55-100 20q-21 0-42-3l-471 235q1 6 1 12t0 12q0 53-20 99t-55 82-81 55-100 20q-52 0-98-20t-82-54-56-81-21-98v-13q0-6 2-14l-471-235q-21 3-42 3-53 0-99-20t-82-55-55-81-20-100q0-71 36-131t99-94l175-642q-54-69-54-157 0-53 20-99t55-82 81-55T512 0q69 0 128 34t94 94h580q35-60 94-94t128-34q53 0 99 20t82 55 55 81 20 100q0 42-13 81t-39 73l228 685zm-432 185q0-55 22-105t64-86l-449-337-663 497 2 31h1024zM512 512q-47 0-92-17l-144 530q55 5 103 31t82 70l606-454-350-262q-37 48-90 75t-115 27zm1241 515q8-2 18-2t19-1h10q5 0 10 1l-177-532q-49 19-97 19-20 0-39-3l-217 163 473 355zm-217-899q-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-10zm-256 128H768l-2 31 407 305 193-145q-42-36-64-86t-22-105zM512 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-10zM128 1280q0 27 10 50t27 40 41 28 50 10q27 0 50-10t40-27 28-41 10-50q0-27-10-50t-27-40-41-28-50-10q-27 0-50 10t-40 27-28 41-10 50zm896 640q27 0 50-10t40-27 28-41 10-50q0-27-10-50t-27-40-41-28-50-10q-27 0-50 10t-40 27-28 41-10 50q0 27 10 50t27 40 41 28 50 10zm0-384q63 0 119 29t92 82l375-187q-11-12-21-25t-19-27H478q-8 14-18 27t-22 25l375 187q35-52 91-81t120-30zm768-128q27 0 50-10t40-27 28-41 10-50q0-33-16-62t-44-46l-1 1-1-1 1-1q-32-19-67-19-27 0-50 10t-40 27-28 41-10 50q0 27 10 50t27 40 41 28 50 10z" />
63 </svg>
64 }
65 }
66}