Class: UiComponents::DaisyUi::DataDisplay::Avatar::ItemComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- UiComponents::DaisyUi::DataDisplay::Avatar::ItemComponent
- Defined in:
- app/components/ui_components/daisy_ui/data_display/avatar/item_component.rb
Constant Summary collapse
- STATUSES =
%w[online offline]- 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 + BoxComponent::CSS_CLASSES ).freeze
Constants inherited from BaseComponent
BaseComponent::ALIGNS, BaseComponent::AXES, BaseComponent::COLORS, BaseComponent::KINDS, BaseComponent::SIZES
Instance Method Summary collapse
-
#initialize(placeholder: false, status: nil, **args) ⇒ ItemComponent
constructor
A new instance of ItemComponent.
Constructor Details
#initialize(placeholder: false, status: nil, **args) ⇒ ItemComponent
Returns a new instance of 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 |