hikari-components 0.2.0

Core UI components (40+) for the Hikari design system
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Trait for converting theme identifiers to string

/// Trait for types that can be converted to theme names
pub trait IntoThemeName: std::fmt::Display + 'static {
    fn as_theme_name(&self) -> String;
}

impl IntoThemeName for String {
    fn as_theme_name(&self) -> String {
        self.clone()
    }
}

impl IntoThemeName for &'static str {
    fn as_theme_name(&self) -> String {
        (*self).to_string()
    }
}