refactor
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
use gpui::prelude::FluentBuilder as _;
|
||||
use gpui::{
|
||||
App, BoxShadow, ClickEvent, ElementId, InteractiveElement as _, IntoElement,
|
||||
ParentElement as _, RenderOnce, Role, SharedString, StatefulInteractiveElement as _,
|
||||
Styled as _, Window, px,
|
||||
App, ClickEvent, ElementId, InteractiveElement as _, IntoElement, ParentElement as _,
|
||||
RenderOnce, Role, SharedString, StatefulInteractiveElement as _, Styled as _, Window,
|
||||
};
|
||||
use gpui_native_theme::{ActiveTheme as _, Size};
|
||||
use gpui_native_utils::focus_ring;
|
||||
|
||||
use crate::common::{Sizable, h_flex};
|
||||
|
||||
@@ -113,11 +113,7 @@ impl RenderOnce for Link {
|
||||
.focusable()
|
||||
.tab_stop(true)
|
||||
.hover(move |style| style.text_color(ramps.primary.hover))
|
||||
.focus_visible(|style| {
|
||||
style.shadow(vec![
|
||||
BoxShadow::new(px(0.), px(0.), colors.ring).spread_radius(px(3.)),
|
||||
])
|
||||
})
|
||||
.focus_visible(|style| style.shadow(focus_ring(colors.ring)))
|
||||
.on_click(move |event, window, cx| match on_click.as_ref() {
|
||||
Some(on_click) => on_click(event, window, cx),
|
||||
None => {
|
||||
|
||||
Reference in New Issue
Block a user