Checkpoint, MenuHandle can open one

This commit is contained in:
Conrad Irwin 2023-11-16 13:32:19 -07:00
parent d782426491
commit 267e07472d
3 changed files with 136 additions and 8 deletions

View file

@ -1,8 +1,8 @@
use smallvec::SmallVec;
use crate::{
point, AnyElement, BorrowWindow, Bounds, Element, LayoutId, ParentComponent, Pixels, Point,
Size, Style,
point, AnyElement, BorrowWindow, Bounds, Component, Element, LayoutId, ParentComponent, Pixels,
Point, Size, Style,
};
pub struct OverlayState {
@ -48,6 +48,12 @@ impl<V: 'static> ParentComponent<V> for Overlay<V> {
}
}
impl<V: 'static> Component<V> for Overlay<V> {
fn render(self) -> AnyElement<V> {
AnyElement::new(self)
}
}
impl<V: 'static> Element<V> for Overlay<V> {
type ElementState = OverlayState;