Add Background widget

This commit is contained in:
Joscha 2023-02-16 16:26:47 +01:00
parent b327dee3c3
commit 3f7e985b3f
4 changed files with 80 additions and 1 deletions

View file

@ -1,6 +1,6 @@
use async_trait::async_trait;
use crate::widgets::{Border, Float, Padding};
use crate::widgets::{Background, Border, Float, Padding};
use crate::{Frame, Size};
// TODO Feature-gate these traits
@ -29,6 +29,10 @@ pub trait AsyncWidget<E> {
}
pub trait WidgetExt: Sized {
fn background(self) -> Background<Self> {
Background::new(self)
}
fn border(self) -> Border<Self> {
Border::new(self)
}