use yew::prelude::{html, Component, Context, Html, Properties};
pub struct GripperTool {}
#[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 GripperTool {
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={ "GripperTool" }
viewBox={ "0 0 16 16" }
fill={ props.fill.unwrap_or("currentColor") }
style={ style }
>
<path d="M1024 0q132 0 248 50t204 138 137 203 51 249v768q0 132-50 248t-138 204-203 137-249 51q-132 0-248-50t-204-138-137-203-51-249V640q0-132 50-248t138-204T775 51t249-51zm0 1024q79 0 149-30t122-83 82-122 31-149q0-79-30-149t-83-122-122-82-149-31q-79 0-149 30t-122 83-82 122-31 149q0 79 30 149t83 122 122 82 149 31zm0-651q55 0 103 21t85 57 58 85 21 104q0 55-21 103t-57 85-85 58-104 21q-55 0-103-21t-85-57-58-85-21-104q0-55 21-103t57-85 85-58 104-21z" />
</svg>
}
}
}