1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct FileSql {}
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 FileSql {
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={ "FileSQL" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path d="M256 1920h128v128H128V0h1115l549 549v731h-128V640h-512V128H256v1792zM1280 512h293l-293-293v293zM675 1558q0 26 19 44t48 35 63 32 62 37 48 51 20 72q0 45-18 74t-49 47-67 25-75 7q-15 0-35-2t-40-5-40-10-32-14v-95q12 12 30 21t37 16 40 9 37 4q19 0 39-2t37-11 28-23 11-39q0-27-19-45t-48-34-63-31-62-37-48-50-20-73q0-41 19-70t49-47 66-27 72-9q30 0 65 3t62 17v91q-26-19-58-26t-64-8q-17 0-37 3t-37 12-28 22-12 36zm860 130q0 35-5 69t-19 65-33 60-48 50l161 116h-140l-100-77q-22 5-42 8t-43 3q-62 0-111-21t-84-58-52-89-18-112q0-63 18-117t53-93 86-62 117-22q61 0 109 22t82 59 51 89 18 110zm-269 214q46 0 78-16t54-45 30-65 10-79q0-40-9-78t-29-66-52-46-78-18q-44 0-76 17t-53 47-32 66-11 77q0 39 10 76t30 66 52 46 76 18zm679-7v78h-308v-556h92v478h216z" />
63 </svg>
64 }
65 }
66}