🎨 Move DownArrowIcon to the new icons file

This commit is contained in:
2023-08-20 19:53:28 +02:00
parent 94d0ea1cc8
commit 3b89cd1769
5 changed files with 25 additions and 21 deletions

View File

@@ -1,24 +1,12 @@
use dioxus::prelude::*; use dioxus::prelude::*;
use dioxus_free_icons::icons::md_navigation_icons::MdArrowDropDown;
use dioxus_free_icons::Icon;
use dioxus_std::utils::rw::UseRw; use dioxus_std::utils::rw::UseRw;
use crate::base::Store; use crate::base::Store;
use crate::components::avatar_selector::AvatarSelector; use crate::components::avatar_selector::AvatarSelector;
use crate::components::icons::DownArrowIcon;
turf::style_sheet!("src/components/contacts_window/user_infos.scss"); turf::style_sheet!("src/components/contacts_window/user_infos.scss");
fn DownArrowIcon(cx: Scope) -> Element {
cx.render(rsx! {
style { STYLE_SHEET },
Icon {
class: ClassName::DOWN_ARROW_ICON,
icon: MdArrowDropDown,
}
})
}
static MESSAGE_PLACEHOLDER: &str = "<Enter a personal message>"; static MESSAGE_PLACEHOLDER: &str = "<Enter a personal message>";
#[inline_props] #[inline_props]

View File

@@ -61,11 +61,3 @@
} }
} }
} }
.downArrowIcon {
color: transparent;
path:last-child {
fill: white;
}
}

16
src/components/icons.rs Normal file
View File

@@ -0,0 +1,16 @@
use dioxus::prelude::*;
use dioxus_free_icons::icons::md_navigation_icons::MdArrowDropDown;
use dioxus_free_icons::Icon;
turf::style_sheet!("src/components/icons.scss");
pub fn DownArrowIcon(cx: Scope) -> Element {
cx.render(rsx! {
style { STYLE_SHEET },
Icon {
class: ClassName::DOWN_ARROW_ICON,
icon: MdArrowDropDown,
}
})
}

View File

@@ -0,0 +1,7 @@
.down-arrow-icon {
color: transparent;
path:last-child {
fill: white;
}
}

View File

@@ -2,5 +2,6 @@ pub mod avatar_selector;
pub mod chats_window; pub mod chats_window;
pub mod contacts_window; pub mod contacts_window;
pub mod header; pub mod header;
pub mod icons;
pub mod login; pub mod login;
pub mod main_window; pub mod main_window;