zuicon_mdl2/
progress_loop_outer.rs1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct ProgressLoopOuter {}
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 ProgressLoopOuter {
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={ "ProgressLoopOuter" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path d="M960 131q-128 9-245 53T498 300 320 470 194 687L73 648q54-138 144-252t205-199T675 63 960 3v128zm894 556q-48-118-126-216t-178-171-217-116-245-53V3q148 9 285 59t252 135 206 198 145 253l-122 39zM128 1024q0 99 21 194t63 183 100 166 135 142l-75 104q-88-73-157-162T98 1460t-73-211-25-225q0-65 8-128t25-127l122 40q-13 53-20 107t-7 108zm1887-255q16 63 24 126t9 129q0 115-25 225t-73 211-117 190-157 163l-75-104q76-64 135-142t100-165 62-183 22-195q0-54-7-108t-20-107l122-40zm-991 1151q127 0 246-34t227-102l75 103q-123 79-262 120t-286 41q-146 0-285-41t-263-120l75-103q107 67 226 101t247 35z" />
63 </svg>
64 }
65 }
66}