Wire up hover styles on Button
s
This commit is contained in:
parent
7f69350e4d
commit
8321b9430e
1 changed files with 9 additions and 1 deletions
|
@ -162,7 +162,15 @@ impl<S: 'static + Send + Sync + Clone> Button<S> {
|
|||
.rounded_md()
|
||||
.border()
|
||||
.border_color(border_color)
|
||||
.bg(self.background_color(cx));
|
||||
.bg(self.background_color(cx))
|
||||
.hover(|style| {
|
||||
let color = ThemeColor::new(cx);
|
||||
|
||||
style.bg(match self.variant {
|
||||
ButtonVariant::Ghost => color.ghost_element_hover,
|
||||
ButtonVariant::Filled => color.filled_element_hover,
|
||||
})
|
||||
});
|
||||
|
||||
match (self.icon, self.icon_position) {
|
||||
(Some(_), Some(IconPosition::Left)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue