use super::style::{ButtonStyle, DefaultButtonStyle};
use super::theme::{ButtonTheme, DefaultButtonTheme};
pub struct ButtonSettings {
pub theme: Box<dyn ButtonTheme>,
pub style: Box<dyn ButtonStyle>,
}
impl Default for ButtonSettings {
fn default() -> Self {
Self {
theme: Box::new(DefaultButtonTheme),
style: Box::new(DefaultButtonStyle),
}
}
}
impl ButtonSettings {
pub fn with_theme(mut self, theme: Box<dyn ButtonTheme>) -> Self {
self.theme = theme;
self
}
pub fn with_style(mut self, style: Box<dyn ButtonStyle>) -> Self {
self.style = style;
self
}
}