zuicon_bs/
filetype_docx.rs1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct FiletypeDocx {}
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 FiletypeDocx {
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={ "filetype-docx" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-6.839 9.688v-.522a1.5 1.5 0 0 0-.117-.641.86.86 0 0 0-.322-.387.86.86 0 0 0-.469-.129.87.87 0 0 0-.471.13.87.87 0 0 0-.32.386 1.5 1.5 0 0 0-.117.641v.522q0 .384.117.641a.87.87 0 0 0 .32.387.9.9 0 0 0 .471.126.9.9 0 0 0 .469-.126.86.86 0 0 0 .322-.386 1.55 1.55 0 0 0 .117-.642m.803-.516v.513q0 .563-.205.973a1.47 1.47 0 0 1-.589.627q-.381.216-.917.216a1.86 1.86 0 0 1-.92-.216 1.46 1.46 0 0 1-.589-.627 2.15 2.15 0 0 1-.205-.973v-.513q0-.569.205-.975.205-.411.59-.627.386-.22.92-.22.535 0 .916.22.383.219.59.63.204.406.204.972M1 15.925v-3.999h1.459q.609 0 1.005.235.396.233.589.68.196.445.196 1.074 0 .634-.196 1.084-.197.451-.595.689-.396.237-.999.237zm1.354-3.354H1.79v2.707h.563q.277 0 .483-.082a.8.8 0 0 0 .334-.252q.132-.17.196-.422a2.3 2.3 0 0 0 .068-.592q0-.45-.118-.753a.9.9 0 0 0-.354-.454q-.237-.152-.61-.152Zm6.756 1.116q0-.373.103-.633a.87.87 0 0 1 .301-.398.8.8 0 0 1 .475-.138q.225 0 .398.097a.7.7 0 0 1 .273.26.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964 1.4 1.4 0 0 0-.49-.272 1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223-.375.222-.571.633-.197.41-.197.978v.498q0 .568.194.976.195.406.571.627.375.216.914.216.44 0 .785-.164t.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364.7.7 0 0 1-.273.248.9.9 0 0 1-.401.088.85.85 0 0 1-.478-.131.83.83 0 0 1-.298-.393 1.7 1.7 0 0 1-.103-.627zm5.092-1.76h.894l-1.275 2.006 1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015-1.228-1.984h.932l.832 1.439h.035z"/>
63 </svg>
64 }
65 }
66}