💄 Make the "logo" shape reusable
This commit is contained in:
@@ -10,12 +10,32 @@ include!(concat!(env!("OUT_DIR"), "/style_vars.rs"));
|
||||
use style::{COLOR_PRIMARY_100, COLOR_TERNARY_100};
|
||||
|
||||
pub fn DownArrowIcon() -> Element {
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub(crate) struct LogoShape;
|
||||
impl IconShape for LogoShape {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 184 94"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
"stroke-linejoin": "round",
|
||||
"stroke-width": "6",
|
||||
d: "M121.208 2 2 57.011l70.927-.265L61.363 92 182 36.724h-69.498L121.208 2Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn LogoIcon() -> Element {
|
||||
rsx! {
|
||||
style { {STYLE_SHEET} },
|
||||
|
||||
Icon {
|
||||
class: ClassName::DOWN_ARROW_ICON,
|
||||
icon: MdArrowDropDown,
|
||||
icon: LogoShape,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user