Class: UiComponents::DaisyUi::DataDisplay::Avatar::Item::BoxComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- UiComponents::DaisyUi::DataDisplay::Avatar::Item::BoxComponent
- Defined in:
- app/components/ui_components/daisy_ui/data_display/avatar/item/box_component.rb
Constant Summary collapse
- MASKS =
%w[squircle hexagon triangle].freeze
- CSS_CLASSES_DEFAULT =
%w[w-24].freeze
- CSS_CLASSES_VARIANTS =
( %w[mask bg-neutral text-neutral-content ring-primary ring-offset-base-100 ring ring-offset-2] + MASKS.map { |key| "mask-#{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 Attribute Summary
Attributes inherited from BaseComponent
Instance Method Summary collapse
-
#initialize(placeholder: false, with_ring: false, mask: nil, **args) ⇒ BoxComponent
constructor
A new instance of BoxComponent.
Methods inherited from BaseComponent
Constructor Details
#initialize(placeholder: false, with_ring: false, mask: nil, **args) ⇒ BoxComponent
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/components/ui_components/daisy_ui/data_display/avatar/item/box_component.rb', line 22 def initialize( placeholder: false, with_ring: false, mask: nil, **args ) @placeholder = placeholder @with_ring = with_ring @mask = mask super(**args) end |