zuicon_mdl2/
build_definition.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 BuildDefinition {}
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 BuildDefinition {
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={ "BuildDefinition" }
58                viewBox={ "0 0 16 16" }
59                fill={ props.fill.unwrap_or("currentColor") }
60                style={ style }
61            >
62            <path d="M896 1920h128v128H0v-128h128v-832q0-76 28-143t76-119 114-84 142-37l608-627q35-36 82-57t98-21q36 0 72 10t68 29 57 46 41 61l384 858q17 37 17 83 0 40-14 75t-40 61-61 42-75 15q-57 0-104-31t-71-83l-251-562-408 421q2 16 3 31t2 32v832zm498-1414l198 440 117-50-220-493q-19 29-45 54t-50 49zm394 581q0-20-9-38t-17-36l-118 50q7 15 13 30t15 29 21 21 33 9q27 0 44-19t18-46zM644 727q62 23 113 65t85 99l530-546q18-19 27-42t9-49q0-26-10-49t-27-40-40-27-49-10q-56 0-94 39L644 727zM256 1920h512v-832q0-53-20-99t-55-82-81-55-100-20q-53 0-99 20t-82 55-55 81-20 100v832zm256-896q27 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 128h64-64zm896 640v-128h640v128h-640zm0-384h640v128h-640v-128zm-256 128v-128h128v128h-128zm256 512v-128h640v128h-640zm-256 0v-128h128v128h-128zm0-256v-128h128v128h-128z" />
63            </svg>
64        }
65    }
66}