💄 Add Wallpaper, Spinner and LoadingPage widgets
This commit is contained in:
38
src/components/spinner.rs
Normal file
38
src/components/spinner.rs
Normal file
@@ -0,0 +1,38 @@
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_free_icons::{Icon, IconShape};
|
||||
|
||||
turf::style_sheet!("src/components/spinner.scss");
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
struct _Spinner;
|
||||
impl IconShape for _Spinner {
|
||||
fn view_box(&self) -> String {
|
||||
String::from("0 0 184 94")
|
||||
}
|
||||
fn xmlns(&self) -> String {
|
||||
String::from("http://www.w3.org/2000/svg")
|
||||
}
|
||||
fn child_elements(&self) -> LazyNodes {
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn Spinner(cx: Scope) -> Element {
|
||||
cx.render(rsx! {
|
||||
style { STYLE_SHEET },
|
||||
|
||||
div {
|
||||
class: ClassName::ROOT,
|
||||
Icon {
|
||||
icon: _Spinner,
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user