use yew::prelude::{html, Component, Context, Html, Properties};
pub struct BookmarkStar {}
#[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 BookmarkStar {
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={ "bookmark-star" }
viewBox={ "0 0 16 16" }
fill={ props.fill.unwrap_or("currentColor") }
style={ style }
>
<path d="M7.84 4.1a.178.178 0 0 1 .32 0l.634 1.285a.18.18 0 0 0 .134.098l1.42.206c.145.021.204.2.098.303L9.42 6.993a.18.18 0 0 0-.051.158l.242 1.414a.178.178 0 0 1-.258.187l-1.27-.668a.18.18 0 0 0-.165 0l-1.27.668a.178.178 0 0 1-.257-.187l.242-1.414a.18.18 0 0 0-.05-.158l-1.03-1.001a.178.178 0 0 1 .098-.303l1.42-.206a.18.18 0 0 0 .134-.098z"/>
<path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1z"/>
</svg>
}
}
}