zuicon_mdl2/
variable_group.rs1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct VariableGroup {}
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 VariableGroup {
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={ "VariableGroup" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path d="M690 1347q0-23 15-38t38-15q12 0 23 6t20 13 16 13 15 6q10 0 26-15t35-40 39-53 37-57 29-50 17-34q-8-34-17-67t-17-67q-8-31-17-54t-24-40-34-24-48-9q-10 0-20 1t-22 3v-25l184-33q21 23 35 46t24 48 17 51 15 57q15-22 37-56t51-67 61-55 67-24q25 0 45 13t20 41q0 54-54 54-20 0-37-9t-37-9q-19 0-40 19t-40 45-36 52-26 42l57 237q1 7 4 19t8 25 12 22 16 10q12 0 27-11t30-28 25-32 16-28l24 12q-8 19-28 47t-45 54-52 46-49 19q-22 0-36-13t-26-30q-9-16-17-46t-15-65-13-68-14-53q-11 20-26 48t-36 58-43 61-48 54-50 39-51 15q-26 0-46-17t-21-44zm826 61q54-69 83-149t29-169q0-90-29-170t-83-152h94q118 139 118 322 0 91-28 170t-90 148h-94zM0 128h2048v1664H0V128zm1920 1536V640H128v1024h1792zm0-1152V256H128v256h1792zM438 1408q-62-68-90-147t-28-171q0-183 118-322h93q-54 70-82 151t-29 171q0 87 28 168t83 150h-93z" />
63 </svg>
64 }
65 }
66}