icons 0.8.0

Icons for Rust fullstack applications — Leptos and Dioxus.
Documentation
use leptos::prelude::*;
use strum::{AsRefStr, Display, EnumIter};

use super::animated_icon_component::AnimatedIcon;
use crate::common::StaticSvgElement;

// * This file was was generated automatically. Please DO NOT edit manually.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, EnumIter, Display, AsRefStr)]
pub enum AnimatedIconType {
    AArrowDownAnimate,
    AirVentAnimate,
    AlarmClockAnimate,
    HeartAnimate,
    PlusAnimate,
}

/* ========================================================== */
/*                     ✨ FUNCTIONS ✨                        */
/* ========================================================== */

/// Get static SVG elements for a specific animated icon. Zero-allocation O(1) lookup.
pub fn get_animated_icon_elements(icon_type: AnimatedIconType) -> Option<&'static [StaticSvgElement]> {
    match icon_type {
        AnimatedIconType::AArrowDownAnimate => Some(crate::common::icon_registry_elements::AARROWDOWN_ELEMENTS),
        AnimatedIconType::AirVentAnimate => Some(crate::common::icon_registry_elements::AIRVENT_ELEMENTS),
        AnimatedIconType::AlarmClockAnimate => Some(crate::common::icon_registry_elements::ALARMCLOCK_ELEMENTS),
        AnimatedIconType::HeartAnimate => Some(crate::common::icon_registry_elements::HEART_ELEMENTS),
        AnimatedIconType::PlusAnimate => Some(crate::common::icon_registry_elements::PLUS_ELEMENTS),
    }
}

/* ========================================================== */
/*                     ✨ FUNCTIONS ✨                        */
/* ========================================================== */

/// AArrowDownAnimate icon component
#[component]
pub fn AArrowDownAnimate(#[prop(into, optional)] class: Signal<String>) -> impl IntoView {
    view! { <AnimatedIcon icon=AnimatedIconType::AArrowDownAnimate class=class /> }
}

/// AirVentAnimate icon component
#[component]
pub fn AirVentAnimate(#[prop(into, optional)] class: Signal<String>) -> impl IntoView {
    view! { <AnimatedIcon icon=AnimatedIconType::AirVentAnimate class=class /> }
}

/// AlarmClockAnimate icon component
#[component]
pub fn AlarmClockAnimate(#[prop(into, optional)] class: Signal<String>) -> impl IntoView {
    view! { <AnimatedIcon icon=AnimatedIconType::AlarmClockAnimate class=class /> }
}

/// HeartAnimate icon component
#[component]
pub fn HeartAnimate(#[prop(into, optional)] class: Signal<String>) -> impl IntoView {
    view! { <AnimatedIcon icon=AnimatedIconType::HeartAnimate class=class /> }
}

/// PlusAnimate icon component
#[component]
pub fn PlusAnimate(#[prop(into, optional)] class: Signal<String>) -> impl IntoView {
    view! { <AnimatedIcon icon=AnimatedIconType::PlusAnimate class=class /> }
}