refactor: add button components to theme because they have different overlays than others when they are hovered or pressed

This commit is contained in:
Ashley Wulber 2023-08-07 16:57:25 -04:00 committed by Ashley Wulber
parent 1c5a233a98
commit 20a5227eca
4 changed files with 63 additions and 10 deletions

View file

@ -233,13 +233,13 @@ impl Button {
fn cosmic<'a>(&'a self, theme: &'a Theme) -> &CosmicComponent {
let cosmic = theme.cosmic();
match self {
Button::Primary => &cosmic.accent,
Button::Primary => &cosmic.accent_button,
Button::Secondary => &theme.current_container().component,
Button::Positive => &cosmic.success,
Button::Destructive => &cosmic.destructive,
Button::Text => &theme.current_container().component,
Button::Link => &cosmic.accent,
Button::LinkActive => &cosmic.accent,
Button::Positive => &cosmic.success_button,
Button::Destructive => &cosmic.destructive_button,
Button::Text => &cosmic.text_button,
Button::Link => &cosmic.accent_button,
Button::LinkActive => &cosmic.accent_button,
Button::Transparent => &TRANSPARENT_COMPONENT,
Button::Deactivated => &theme.current_container().component,
Button::Card => &theme.current_container().component,