diff --git a/src/ui/widgets.rs b/src/ui/widgets.rs index 3a2d948..7b406f2 100644 --- a/src/ui/widgets.rs +++ b/src/ui/widgets.rs @@ -1,4 +1,5 @@ pub mod background; +pub mod empty; pub mod list; pub mod text; diff --git a/src/ui/widgets/empty.rs b/src/ui/widgets/empty.rs new file mode 100644 index 0000000..2ef28d9 --- /dev/null +++ b/src/ui/widgets/empty.rs @@ -0,0 +1,15 @@ +use async_trait::async_trait; +use toss::frame::{Frame, Pos, Size}; + +use super::Widget; + +pub struct Empty; + +#[async_trait] +impl Widget for Empty { + fn size(&self, _frame: &mut Frame, _max_width: Option, _max_height: Option) -> Size { + Size::ZERO + } + + async fn render(self: Box, _frame: &mut Frame, _pos: Pos, _size: Size) {} +}