Class: UiComponents::DaisyUi::DataDisplay::Avatar::ItemComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/ui_components/daisy_ui/data_display/avatar/item_component.rb

Constant Summary collapse

STATUSES =
%w[online offline].freeze
CSS_CLASSES_DEFAULT =
%w[avatar].freeze
CSS_CLASSES_VARIANTS =
(
  %w[avatar-placeholder] +
  STATUSES.map { |key| "avatar-#{key}" }
).freeze
CSS_CLASSES =
(
  CSS_CLASSES_DEFAULT +
  CSS_CLASSES_VARIANTS +
  Item::BoxComponent::CSS_CLASSES
).freeze

Constants inherited from BaseComponent

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

Instance Attribute Summary

Attributes inherited from BaseComponent

#slot_order

Instance Method Summary collapse

Methods inherited from BaseComponent

tracks_slot_order

Constructor Details

#initialize(placeholder: false, status: nil, **args) ⇒ ItemComponent



29
30
31
32
33
34
35
36
37
38
# File 'app/components/ui_components/daisy_ui/data_display/avatar/item_component.rb', line 29

def initialize(
    placeholder: false,
    status: nil,
    **args
  )
  @placeholder = placeholder
  @status = status

  super(**args)
end