Introduce container::background style helper
This commit is contained in:
parent
0dcec519be
commit
feff4d1cba
1 changed files with 5 additions and 0 deletions
|
|
@ -629,6 +629,11 @@ pub fn transparent<Theme>(_theme: &Theme) -> Style {
|
||||||
Style::default()
|
Style::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A [`Container`] with the given [`Background`].
|
||||||
|
pub fn background(background: impl Into<Background>) -> Style {
|
||||||
|
Style::default().background(background)
|
||||||
|
}
|
||||||
|
|
||||||
/// A rounded [`Container`] with a background.
|
/// A rounded [`Container`] with a background.
|
||||||
pub fn rounded_box(theme: &Theme) -> Style {
|
pub fn rounded_box(theme: &Theme) -> Style {
|
||||||
let palette = theme.extended_palette();
|
let palette = theme.extended_palette();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue