chore: audit components
This commit is contained in:
@@ -6,7 +6,7 @@ use gpui::{
|
||||
Animation, AnimationExt as _, AnyElement, App, Bounds, DispatchPhase, ElementId,
|
||||
InteractiveElement as _, IntoElement, KeyDownEvent, MouseButton, MouseDownEvent,
|
||||
ParentElement as _, Pixels, RenderOnce, Role, SharedString, StatefulInteractiveElement as _,
|
||||
Styled as _, Window, anchored, canvas, deferred, div, ease_out_quint, point, px,
|
||||
Styled as _, Window, anchored, canvas, deferred, div, ease_out_quint, point,
|
||||
};
|
||||
use gpui_native_theme::ActiveTheme as _;
|
||||
|
||||
@@ -21,6 +21,7 @@ type BoundsCell = Rc<RefCell<Option<Bounds<Pixels>>>>;
|
||||
|
||||
/// A floating panel anchored below its trigger.
|
||||
#[derive(IntoElement)]
|
||||
#[must_use]
|
||||
pub struct Popover {
|
||||
id: ElementId,
|
||||
open: bool,
|
||||
@@ -225,7 +226,7 @@ impl RenderOnce for Popover {
|
||||
|
||||
wrapper.child(deferred(
|
||||
anchored()
|
||||
.offset(point(px(0.), anchor_gap))
|
||||
.offset(point(Pixels::ZERO, anchor_gap))
|
||||
.child(panel.with_animation(
|
||||
"popover-enter",
|
||||
Animation::new(enter_duration).with_easing(ease_out_quint()),
|
||||
|
||||
Reference in New Issue
Block a user