zuicon_mdl2/
test_impact_solid.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 TestImpactSolid {}
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 TestImpactSolid {
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={ "TestImpactSolid" }
58                viewBox={ "0 0 16 16" }
59                fill={ props.fill.unwrap_or("currentColor") }
60                style={ style }
61            >
62            <path d="M798 1850q0 39 16 75t43 63 63 44 75 16H354q-40 0-75-15t-61-41-42-61-15-75q0-27 7-51t21-48l569-990q10-18 10-35V128H640V0h768v128h-128v385h-11q-33 0-60 6t-57 27V128H896v604q0 52-28 100l-330 576h486l-199 348q-13 23-20 45t-7 49zm1061-91q14 23 21 46t7 51q0 40-15 75t-41 61-62 41-74 15H995q49 0 94-25t71-68l290-501q6 34 25 62t46 48 59 32 66 11q58 0 108-32l105 184zm-6-779q28 0 47 21t20 49q0 14-8 28l-212 370q-18 31-54 31-29 0-51-19t-22-49q0-18 7-30t18-26l-179-103-370 639q-8 14-23 21t-32 8q-14 0-26-6t-21-16-15-23-6-26q0-14 8-27l366-638-175-102q-8 12-14 22t-12 17-17 12-25 5q-29 0-52-18t-23-49q0-7 1-16t6-15l217-370q8-14 23-22t32-8q28 0 50 21t22 49q0 17-8 28t-17 25l473 272q15-22 28-38t44-17z" />
63            </svg>
64        }
65    }
66}