Improve the contrast on destructive buttons and add colors to the
Some checks failed
Monorepo build / build-flake (push) Has been cancelled

primary button
This commit is contained in:
2026-03-18 12:21:31 -04:00
parent 170fe3e764
commit cc1c2f599e
2 changed files with 29 additions and 11 deletions

View File

@@ -60,18 +60,28 @@ pub fn Button(
))
};
let button_destructive = classes!(css!(
color: ${stylesheet.color_warning_base};
));
let button_destructive = classes!(
stylesheet.typography_bold(),
css!(
color: ${stylesheet.color_warning_dark};
)
);
let button_primary_destructive = classes!(css!(
color: ${stylesheet.color_warning_lightest};
background-color: ${stylesheet.color_warning_base};
));
let button_primary_destructive = classes!(
stylesheet.typography_bold(),
css!(
color: ${stylesheet.color_warning_lightest};
background-color: ${stylesheet.color_warning_dark};
)
);
let button_primary = classes!(css!(
color: ${stylesheet.color_text_default()};
));
let button_primary = classes!(
stylesheet.typography_bold(),
css!(
color: ${stylesheet.color_text_ondark()};
background-color: ${stylesheet.color_primary_dark};
)
);
(
base_style,
@@ -102,7 +112,7 @@ pub fn Button(
html! {
<button
class={classes!(class.clone(), base_style, padding, classes)}
class={classes!(base_style, padding, classes, class.clone())}
onclick={on_click_}
disabled={*disabled}>{children.clone()}</button>
}

View File

@@ -218,6 +218,14 @@ impl Stylesheet {
))
}
pub fn typography_bold(&self) -> Classes {
classes!(css!(
font-family: ${self.typography_font_family_base};
font-size: ${self.typography_font_size_base};
font-weight: 600;
))
}
pub fn typography_caption(&self) -> Classes {
classes!(css!(
font-family: ${self.typography_font_family_base};