Class: UiComponents::DaisyUi::BaseComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/ui_components/daisy_ui/base_component.rb

Constant Summary collapse

SIZES =
%w[xs sm lg xl].freeze
KINDS =
%w[soft outline dash active disabled ghost link].freeze
COLORS =
%w[neutral primary secondary accent info success warning error].freeze
ALIGNS =
%w[start center end].freeze
AXES =
%w[top right bottom left].freeze
CSS_CLASSES_DEFAULT =
%w[].freeze
CSS_CLASSES_VARIANTS =
%w[].freeze
CSS_CLASSES =
(CSS_CLASSES_DEFAULT + CSS_CLASSES_VARIANTS).freeze

Instance Method Summary collapse

Constructor Details

#initialize(css_class: nil, css_style: nil, options: {}) ⇒ BaseComponent

Returns a new instance of BaseComponent.



18
19
20
21
22
23
24
25
26
# File 'app/components/ui_components/daisy_ui/base_component.rb', line 18

def initialize(
    css_class: nil,
    css_style: nil,
    options: {}
  )
  @css_class = css_class.to_s
  @css_style = css_style.to_s
  @options = options
end