zuicon_mdl2/
web_environment.rs

1// Copyright (c) 2024 Xu Shaohua <shaohua@biofan.org>. All rights reserved.
2// Use of this source is governed by Lesser General Public License
3// that can be found in the LICENSE file.
4
5// Auto Generated! DO NOT EDIT!
6
7use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct WebEnvironment {}
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 WebEnvironment {
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        // TODO(Shaohua): Do not generate style attribute if it is empty.
46        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={ "WebEnvironment" }
58                viewBox={ "0 0 16 16" }
59                fill={ props.fill.unwrap_or("currentColor") }
60                style={ style }
61            >
62            <path d="M1920 1280l128 640H0l128-640h232q-51-88-77-185t-27-199q0-106 27-204t78-183 120-156 155-120 184-77 204-28q106 0 204 27t183 78 156 120 120 155 77 184 28 204q0 102-26 199t-78 185h232zm-256-384q0-32-3-64t-10-64h-249q6 65 6 128 0 64-6 128h249q6-32 9-64t4-64zm-890 128h500q6-64 6-128 0-63-6-128H774q-6 65-6 128 0 64 6 128zm482 128H792q4 23 14 60t25 81 35 86 44 78 53 57 61 22q32 0 60-22t53-57 44-78 35-86 25-80 15-61zm-477 335q-46-76-74-162t-43-173H438q24 53 60 103t80 95 96 79 105 58zm607-335q-16 86-43 172t-73 163q54-24 104-59t95-78 81-94 60-104h-224zm224-512q-51-113-138-200t-203-135q46 76 73 162t44 173h224zm-586-384q-32 0-60 22t-53 57-44 78-35 86-26 80-14 61h464q-5-23-14-60t-25-81-35-86-44-78-53-57-61-22zm-245 49q-115 48-202 135T438 640h224q16-87 43-173t74-162zM397 768q-6 32-9 64t-4 64q0 32 3 64t10 64h249q-6-64-6-128 0-63 6-128H397zM156 1792h1736l-77-384h-220q-54 61-119 108t-139 81-152 50-161 17q-82 0-161-17t-152-50-138-80-120-109H233l-77 384z" />
63            </svg>
64        }
65    }
66}