use yew::prelude::{html, Component, Context, Html, Properties};
pub struct ScreenCast {}
#[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 ScreenCast {
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={ "ScreenCast" }
viewBox={ "0 0 16 16" }
fill={ props.fill.unwrap_or("currentColor") }
style={ style }
>
<path d="M1408 1792q0-27-10-50t-27-40-41-28-50-10v-128q53 0 99 20t82 55 55 81 20 100h-128zM128 384v896h1024v128h-128v128h128v128H640v-128h256v-128H0V256h1920v866q-59-56-128-102V384H128zm1536 1408q0-79-30-149t-82-122-123-83-149-30v-128q106 0 199 40t163 109 110 163 40 200h-128zm256 0q0-132-50-248t-138-204-203-137-249-51v-128q106 0 204 27t183 78 156 120 120 155 77 184 28 204h-128z" />
</svg>
}
}
}