refactor
This commit is contained in:
parent
ed739d792f
commit
e9a9dad037
19 changed files with 278 additions and 177 deletions
|
@ -1,10 +1,14 @@
|
|||
/// UI Color
|
||||
pub trait UIColor {
|
||||
#[must_use]
|
||||
fn color_class(&self) -> &str;
|
||||
}
|
||||
|
||||
pub trait ColorCircle {
|
||||
#[must_use]
|
||||
fn previous(&self) -> Self;
|
||||
|
||||
#[must_use]
|
||||
fn next(&self) -> Self;
|
||||
}
|
||||
|
||||
|
@ -119,11 +123,11 @@ pub enum Colors {
|
|||
impl UIColor for Colors {
|
||||
fn color_class(&self) -> &str {
|
||||
match self {
|
||||
Colors::Inherit => "inherit",
|
||||
Colors::Current => "current",
|
||||
Colors::Transparent => "transparent",
|
||||
Colors::Black => "black",
|
||||
Colors::White => "white",
|
||||
Self::Inherit => "inherit",
|
||||
Self::Current => "current",
|
||||
Self::Transparent => "transparent",
|
||||
Self::Black => "black",
|
||||
Self::White => "white",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue