feat!(app): ContextDrawer return type for context_drawer method

This commit is contained in:
wiiznokes 2024-11-16 03:38:29 +01:00 committed by GitHub
parent aaadf7199e
commit a355a049d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 115 additions and 68 deletions

View file

@ -6,13 +6,15 @@
mod overlay;
mod widget;
use std::borrow::Cow;
pub use widget::ContextDrawer;
use crate::Element;
/// An overlayed widget that attaches a toggleable context drawer to the view.
pub fn context_drawer<'a, Message: Clone + 'static, Content, Drawer>(
title: &'a str,
title: Option<Cow<'a, str>>,
header_actions: Vec<Element<'a, Message>>,
header_opt: Option<Element<'a, Message>>,
footer_opt: Option<Element<'a, Message>>,