use yew::prelude::{html, Component, Context, Html, Properties};
pub struct PlainText {}
#[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 PlainText {
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={ "PlainText" }
viewBox={ "0 0 16 16" }
fill={ props.fill.unwrap_or("currentColor") }
style={ style }
>
<path d="M128 1535v-255h128v256H128v-1zm384-895v256H384V640h128zm512 1024v-128h128v128h-128zm-128-384h128v256H896v-256zM768 896H640V640h128v256zM640 384v256H512V384h128zm128 512h128v384H256V896h128v256h384V896zM0 1664v-128h128v128H0zm1408-896h384v128h-384V768zm-128 256V896h128v128h-128zm0 256h128v256h-128v-256zm128 384v-128h256v128h-256zm384-768h128v768h-128v-128h-128v-128h128v-128h-384v-128h384V896z" />
</svg>
}
}
}