Introduce container::background style helper

This commit is contained in:
Héctor Ramón Jiménez 2024-09-02 11:59:35 +02:00
parent 0dcec519be
commit feff4d1cba
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -629,6 +629,11 @@ pub fn transparent<Theme>(_theme: &Theme) -> Style {
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.
pub fn rounded_box(theme: &Theme) -> Style {
let palette = theme.extended_palette();