use yew::prelude::{html, Component, Context, Html, Properties};
pub struct Broom {}
#[derive(Properties, Debug, Clone, PartialEq, Eq)]
pub struct Props {
#[prop_or_default]
pub class: Option<&'static str>,
#[prop_or_default]
pub width: Option<&'static str>,
#[prop_or_default]
pub height: Option<&'static str>,
#[prop_or_default]
pub color: Option<&'static str>,
#[prop_or_default]
pub fill: Option<&'static str>,
#[prop_or_default]
pub spin: bool,
#[prop_or_default]
pub rotate: i16,
}
impl Component for Broom {
type Properties = Props;
type Message = ();
fn create(_ctx: &Context<Self>) -> Self {
Self {}
}
fn view(&self, ctx: &Context<Self>) -> Html {
let props = ctx.props();
let mut style = String::new();
if props.rotate != 0 {
style += &format!("transform: rotate({}deg);", props.rotate);
}
html! {
<svg
xmlns={ "http://www.w3.org/2000/svg" }
class={ props.class.unwrap_or("") }
width={ props.width.unwrap_or("16") }
height={ props.height.unwrap_or("16") }
focusable={ "false" }
data-icon={ "Broom" }
viewBox={ "0 0 16 16" }
fill={ props.fill.unwrap_or("currentColor") }
style={ style }
>
<path d="M1984 0q26 0 45 19t19 45q0 26-19 45l-730 730q54 69 81 150t28 168q0 103-39 197t-112 168l-68 68-227 454L4 1086l454-227 68-68q73-73 167-112t198-39q87 0 168 27t150 82l730-730q19-19 45-19zm-915 1543L505 979l-285 142 707 707 142-285zm83-98q61-60 94-130t34-158q0-81-30-151t-84-124-123-83-152-31q-87 0-157 33t-131 95l549 549z" />
</svg>
}
}
}