Merge branch 'main' into element-types

This commit is contained in:
Mikayla 2023-11-14 15:49:10 -08:00
commit 7f72df6dcf
No known key found for this signature in database
27 changed files with 3714 additions and 1471 deletions

View file

@ -71,6 +71,14 @@ impl ModalLayer {
cx.notify();
}
pub fn current_modal<V>(&self) -> Option<View<V>>
where
V: 'static,
{
let active_modal = self.active_modal.as_ref()?;
active_modal.modal.clone().downcast::<V>().ok()
}
}
impl Render for ModalLayer {