zuicon_ant/outlined/
ruby.rs1use yew::prelude::{html, Component, Context, Html, Properties};
8
9pub struct Ruby {}
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 Ruby {
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={ "ruby" }
58 viewBox={ "0 0 16 16" }
59 fill={ props.fill.unwrap_or("currentColor") }
60 style={ style }
61 >
62 <path d="M397.815.02c-.735.049-1.469.12-2.2.213h-4.328l-3.406 1.703a36.334 36.334 0 0 0-8.87 4.4l-145.96 73.013L79.356 233.041 6.696 378.288a36.333 36.333 0 0 0-4.897 9.863l-1.561 3.122v3.974a36.332 36.332 0 0 0 0 8.302v298.229l6.883 9.508c5.975 8.28 12.713 16.544 20.578 24.41 37.856 37.854 87.664 57.169 142.625 62.015a36.335 36.335 0 0 0 11.566 1.774h575.753c3.14.534 6.337.654 9.508.355a36.335 36.335 0 0 0 2.554-.355h29.803V769.54a36.332 36.332 0 0 0 0-11.92V181.88a36.332 36.332 0 0 0-1.774-11.566c-4.848-54.956-24.165-104.757-62.017-142.622h-.071v-.07c-7.85-7.807-16.071-14.49-24.268-20.436l-9.58-6.954H403.138a36.335 36.335 0 0 0-5.322-.213m133.188 72.872h145.96c2.467 2.081 5.248 4.054 7.451 6.245 26.585 26.63 40.964 64.743 42.291 111.188zm-132.691 5.11 65.707 39.38-25.474 156.104-64.359 64.357-100.69 100.687-156.107 25.473-39.381-65.705 61.095-122.258L276.05 139.095zm132.762 79.612 123.183 73.937-138.084 17.242zm178.814 140.21c-21.21 68.248-62.66 142.573-122.402 211.875l-65.85-188.389zm-252.54 59.603 53.645 153.55-153.553-53.643 68.12-68.119zm269.499 81.032v236.994L626.44 575.05c40.102-43.738 73.727-89.827 100.406-136.59m-478.044 77.697-17.242 138.081-73.938-123.18zm72.52 5.464 188.322 65.847c-69.283 59.712-143.574 101.195-211.81 122.4zm-248.424 9.366 117.435 195.698c-46.5-1.327-84.636-15.736-111.262-42.361-2.161-2.162-4.113-4.939-6.173-7.38zm502.169 95.436 100.405 100.404h-237c46.768-26.68 92.86-60.308 136.595-100.404" transform="translate(112 112)"/>
63 </svg>
64 }
65 }
66}