Class: UiComponents::DaisyUi::Action::SwapComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/ui_components/daisy_ui/action/swap_component.rb

Constant Summary collapse

EFFECTS =
%w[rotate flip]
CSS_CLASSES_DEFAULT =
%w[swap].freeze
CSS_CLASSES_VARIANTS =
(
  %w[swap-active] +
  EFFECTS.map { |key| "swap-#{key}" }
).freeze
CSS_CLASSES =
(CSS_CLASSES_DEFAULT + CSS_CLASSES_VARIANTS).freeze

Constants inherited from BaseComponent

BaseComponent::ALIGNS, BaseComponent::AXES, BaseComponent::COLORS, BaseComponent::KINDS, BaseComponent::SIZES

Instance Method Summary collapse

Constructor Details

#initialize(effect: nil, active: false, **args) ⇒ SwapComponent

Returns a new instance of SwapComponent.



27
28
29
30
31
32
33
34
35
36
# File 'app/components/ui_components/daisy_ui/action/swap_component.rb', line 27

def initialize(
    effect: nil,
    active: false,
    **args
  )
  @effect = effect
  @active = active

  super(**args)
end