use super::theme::CheckboxTheme;
use super::style::{CheckboxStyle, StandardCheckboxStyle};
use crate::tokens::{BuiltinSet, Tokens, TokenTheme};
pub struct CheckboxSettings {
pub theme: Box<dyn CheckboxTheme>,
pub style: Box<dyn CheckboxStyle>,
}
impl Default for CheckboxSettings {
fn default() -> Self {
Self {
theme: Box::new(TokenTheme::new(Tokens::builtin(BuiltinSet::Dark))),
style: Box::new(StandardCheckboxStyle),
}
}
}
impl CheckboxSettings {
pub fn with_theme(mut self, theme: Box<dyn CheckboxTheme>) -> Self {
self.theme = theme;
self
}
pub fn with_style(mut self, style: Box<dyn CheckboxStyle>) -> Self {
self.style = style;
self
}
}