diff --git a/crates/leptos/src/icons.rs b/crates/leptos/src/icons.rs index d9cdf59..aa8428e 100644 --- a/crates/leptos/src/icons.rs +++ b/crates/leptos/src/icons.rs @@ -53,3 +53,69 @@ pub use sun_moon::SunMoon; pub use telegram::Telegram; pub use twitter::Twitter; pub use youtube::Youtube; + +use leptos::prelude::*; + +pub enum IconVariant { + Alert, + ArrowDown, + ArrowLeft, + ArrowRight, + ArrowUp, + Book, + Close, + Discord, + Ferris, + File, + Filter, + Github, + Link, + Linkedin, + Location, + Menu, + Moon, + Project, + Roadmap, + Search, + Share, + StarBold, + SunLine, + SunMoon, + Telegram, + Twitter, + Youtube, +} + +impl IconVariant { + pub fn to_view(&self) -> AnyView { + match self { + Self::Alert => view! {}.into_any(), + Self::ArrowDown => view! {}.into_any(), + Self::ArrowLeft => view! {}.into_any(), + Self::ArrowRight => view! {}.into_any(), + Self::ArrowUp => view! {}.into_any(), + Self::Book => view! {}.into_any(), + Self::Close => view! {}.into_any(), + Self::Discord => view! {}.into_any(), + Self::Ferris => view! {}.into_any(), + Self::File => view! {}.into_any(), + Self::Filter => view! {}.into_any(), + Self::Github => view! {}.into_any(), + Self::Link => view! {}.into_any(), + Self::Linkedin => view! {}.into_any(), + Self::Location => view! {}.into_any(), + Self::Menu => view! {}.into_any(), + Self::Moon => view! {}.into_any(), + Self::Project => view! {}.into_any(), + Self::Roadmap => view! {}.into_any(), + Self::Search => view! {}.into_any(), + Self::Share => view! {}.into_any(), + Self::StarBold => view! {}.into_any(), + Self::SunLine => view! {}.into_any(), + Self::SunMoon => view! {}.into_any(), + Self::Telegram => view! {}.into_any(), + Self::Twitter => view! {}.into_any(), + Self::Youtube => view! {}.into_any(), + } + } +}