use yew::prelude::{html, Component, Context, Html, Properties};
pub struct HeadsetVr {}
#[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 HeadsetVr {
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={ "headset-vr" }
viewBox={ "0 0 16 16" }
fill={ props.fill.unwrap_or("currentColor") }
style={ style }
>
<path d="M8 1.248c1.857 0 3.526.641 4.65 1.794a5 5 0 0 1 2.518 1.09C13.907 1.482 11.295 0 8 0 4.75 0 2.12 1.48.844 4.122a5 5 0 0 1 2.289-1.047C4.236 1.872 5.974 1.248 8 1.248"/>
<path d="M12 12a4 4 0 0 1-2.786-1.13l-.002-.002a1.6 1.6 0 0 0-.276-.167A2.2 2.2 0 0 0 8 10.5c-.414 0-.729.103-.935.201a1.6 1.6 0 0 0-.277.167l-.002.002A4 4 0 1 1 4 4h8a4 4 0 0 1 0 8"/>
</svg>
}
}
}