use super::style::{ButtonStyle, DefaultButtonStyle};
use super::theme::ButtonTheme;
use crate::tokens::{BuiltinSet, Tokens, TokenTheme};
pub struct ButtonSettings {
pub theme: Box<dyn ButtonTheme>,
pub style: Box<dyn ButtonStyle>,
}
impl Default for ButtonSettings {
fn default() -> Self {
Self {
theme: Box::new(TokenTheme::new(Tokens::builtin(BuiltinSet::Dark))),
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
}
}