#[derive(Default, PartialEq, Clone, Copy)]
pub enum ButtonAppearance {
#[default]
Secondary,
Primary,
Subtle,
Transparent,
}
impl ButtonAppearance {
pub fn as_str(&self) -> &'static str {
match self {
ButtonAppearance::Secondary => "secondary",
ButtonAppearance::Primary => "primary",
ButtonAppearance::Subtle => "subtle",
ButtonAppearance::Transparent => "transparent",
}
}
}
#[derive(Default, PartialEq, Clone, Copy)]
pub enum ButtonShape {
#[default]
Rounded,
Circular,
Square,
}
impl ButtonShape {
pub fn as_str(&self) -> &'static str {
match self {
ButtonShape::Rounded => "rounded",
ButtonShape::Circular => "circular",
ButtonShape::Square => "square",
}
}
}
#[derive(Debug, Default, PartialEq, Clone, Copy)]
pub enum ButtonSize {
Small,
#[default]
Medium,
Large,
}
impl ButtonSize {
pub fn as_str(&self) -> &'static str {
match self {
ButtonSize::Small => "small",
ButtonSize::Medium => "medium",
ButtonSize::Large => "large",
}
}
}
#[derive(Debug, Clone)]
pub enum ButtonType {
Submit,
Reset,
Button,
}
impl ButtonType {
pub fn as_str(&self) -> &'static str {
match self {
Self::Submit => "submit",
Self::Reset => "reset",
Self::Button => "button",
}
}
}