struct Components::Variants::ComponentVariant

Overview

Small value object that keeps component class construction predictable. It is intentionally string-backed so alpha examples can accept params from attrs without exposing raw class soup as the public API.

Defined in:

components/variants/component_variant.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(family : String, tone : String = "brand", emphasis : String = "solid", size : String = "md", state : String = "default") #

[View source]

Instance Method Detail

def classes : String #

[View source]
def clone #

[View source]
def copy_with(family _family = @family, tone _tone = @tone, emphasis _emphasis = @emphasis, size _size = @size, state _state = @state) #

[View source]
def emphasis : String #

def family : String #

def size : String #

def state : String #

def tone : String #