1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct FileLess {}
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 FileLess {
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={ "FileLess" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path d="M256 1920h128v128H128V0h1115l549 549v859h-128V640h-512V128H256v1792zM1280 512h293l-293-293v293zM512 384H384V256h128v128zM384 512h128v128H384V512zm128 384H384V768h128v128zm0 512h97v630h-97v-630zm430 128q56 0 95 19t65 52 38 77 12 96v42H819q2 71 43 106t109 35q77 0 143-46v89q-39 25-85 33t-91 9q-59 0-102-19t-72-52-43-80-14-103q0-52 16-98t46-82 74-57 99-21zm103 208q0-25-5-48t-18-40-33-27-48-11q-27 0-48 10t-36 28-25 41-13 47h226zm293-68q0 23 17 37t44 26 57 22 57 28 44 44 18 68q0 41-20 69t-50 46-68 24-71 8q-36 0-71-6t-68-21v-102q30 23 64 35t73 12q15 0 32-2t33-8 26-17 10-32q0-24-17-38t-44-26-57-21-57-28-44-43-18-70q0-39 18-66t48-45 65-26 68-8q31 0 62 4t60 16v98q-53-36-118-36-13 0-29 2t-30 10-24 18-10 28zm422 0q0 24 17 38t44 25 57 22 57 28 43 44 18 68q0 42-19 70t-50 45-68 24-71 8q-35 0-71-6t-68-21v-102q30 23 64 35t73 12q15 0 32-2t33-8 26-17 10-32q0-24-17-38t-44-26-57-21-57-28-44-43-18-70q0-39 18-66t48-45 65-26 68-8q31 0 62 4t60 16v98q-53-36-119-36-13 0-29 2t-30 10-23 18-10 28z" />
63 </svg>
64 }
65 }
66}