zuicon_mdl2/
file_java.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 FileJava {}
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 FileJava {
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={ "FileJAVA" }
58                viewBox={ "0 0 16 16" }
59                fill={ props.fill.unwrap_or("currentColor") }
60                style={ style }
61            >
62            <path d="M256 1280H128V0h1115l549 549v731h-128V640h-512V128H256v1152zm1024-768h293l-293-293v293zM104 1957q34 0 54-15t32-39 15-52 4-56v-387h104v404q0 48-11 91t-37 75-63 51-91 19q-18 0-36-1t-35-9v-98q14 9 30 13t34 4zm621-549l234 630H844l-56-161H540l-54 161H372l235-630h118zm35 384l-87-251q-3-10-5-19t-5-20q-3 22-9 39l-86 251h192zm728-384l-226 630h-116l-223-630h115l155 478q5 13 7 26t6 27q2-14 5-27t8-27l159-477h110zm552 630h-115l-56-161h-248l-54 161h-115l236-630h118l234 630zm-199-246l-88-251q-3-9-5-19t-5-18q-2 9-3 19t-5 18l-87 251h193z" />
63            </svg>
64        }
65    }
66}