@@ -474,7 +474,6 @@ impl RenderOnce for Button {
|
||||
}
|
||||
}
|
||||
|
||||
// View this component preview using `workspace: open component-preview`
|
||||
impl Component for Button {
|
||||
fn scope() -> ComponentScope {
|
||||
ComponentScope::Input
|
||||
|
||||
@@ -625,7 +625,13 @@ impl RenderOnce for ButtonLike {
|
||||
|refinement: StyleRefinement| refinement.bg(hovered_style.background);
|
||||
this.cursor(self.cursor_style)
|
||||
.hover(focus_color)
|
||||
.focus(focus_color)
|
||||
.map(|this| {
|
||||
if matches!(self.style, ButtonStyle::Outlined) {
|
||||
this.focus(|s| s.border_color(cx.theme().colors().border_focused))
|
||||
} else {
|
||||
this.focus(focus_color)
|
||||
}
|
||||
})
|
||||
.active(|active| active.bg(style.active(cx).background))
|
||||
})
|
||||
.when_some(
|
||||
|
||||
Reference in New Issue
Block a user