summaryrefslogtreecommitdiff
path: root/src/widget/button.rs
blob: e25580818f2df2ca5844b414d2314b2885b41c46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use iced::widget::button::{Status, Style};
use iced_material::Theme;
use iced_material::button::styled;

pub fn danger(theme: &Theme, status: Status) -> Style {
    let error = theme.colors().error;

    let foreground = error.text;
    let background = error.color;
    let disabled = theme.colors().surface.text;

    let shadow_color = theme.colors().shadow;

    styled(background, foreground, disabled, shadow_color, 0, status)
}