use crate::style::Color;
#[derive(Debug, Clone, Copy)]
pub struct Spacing {
pub xs: u8,
pub sm: u8,
pub md: u8,
pub lg: u8,
pub xl: u8,
}
impl Default for Spacing {
fn default() -> Self {
Self {
xs: 2,
sm: 4,
md: 8,
lg: 16,
xl: 24,
}
}
}
#[derive(Debug, Clone, Copy)]
pub struct Radii {
pub none: u8,
pub sm: u8,
pub md: u8,
pub lg: u8,
pub full: u8,
}
impl Default for Radii {
fn default() -> Self {
Self {
none: 0,
sm: 2,
md: 4,
lg: 8,
full: 255,
}
}
}
#[derive(Debug, Clone, Copy)]
pub struct Colors {
pub primary: Color,
pub background: Color,
pub text: Color,
}
impl Default for Colors {
fn default() -> Self {
Self {
primary: Color(98, 0, 238, 255),
background: Color(255, 255, 255, 255),
text: Color(0, 0, 0, 255),
}
}
}
#[derive(Debug, Clone, Copy)]
pub struct Fonts {
pub small: &'static str,
pub body: &'static str,
pub heading: &'static str,
}
impl Default for Fonts {
fn default() -> Self {
Self {
small: "tiny",
body: "default",
heading: "bold",
}
}
}
#[derive(Debug, Clone, Copy, Default)]
pub struct Tokens {
pub spacing: Spacing,
pub colors: Colors,
pub radii: Radii,
pub fonts: Fonts,
}
#[derive(Debug, Clone, Copy)]
pub struct Theme {
pub tokens: Tokens,
}
impl Theme {
pub fn material_light() -> Self {
Self {
tokens: Tokens::default(),
}
}
pub fn apply_global(&self) {
}
}