summaryrefslogtreecommitdiff
path: root/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget')
-rw-r--r--src/widget/button.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/widget/button.rs b/src/widget/button.rs
new file mode 100644
index 0000000..5a1975b
--- /dev/null
+++ b/src/widget/button.rs
@@ -0,0 +1,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 primary = theme.colors().error;
+
+ let foreground = primary.on_error;
+ let background = primary.color;
+ let disabled = theme.colors().surface.on_surface;
+
+ let shadow_color = theme.colors().shadow;
+
+ styled(background, foreground, disabled, shadow_color, 0, status)
+}