Class: UiComponents::DaisyUi::DataDisplay::Avatar::BoxComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- UiComponents::DaisyUi::DataDisplay::Avatar::BoxComponent
- Defined in:
- app/components/ui_components/daisy_ui/data_display/avatar/box_component.rb
Constant Summary collapse
- MASKS =
%w[squircle hexagon triangle]
- CSS_CLASSES_DEFAULT =
%w[avatar 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 Method Summary collapse
-
#initialize(placeholder: false, with_ring: false, mask: nil, **args) ⇒ BoxComponent
constructor
A new instance of BoxComponent.
Constructor Details
#initialize(placeholder: false, with_ring: false, mask: nil, **args) ⇒ BoxComponent
Returns a new instance of BoxComponent.
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/components/ui_components/daisy_ui/data_display/avatar/box_component.rb', line 21 def initialize( placeholder: false, with_ring: false, mask: nil, **args ) @placeholder = placeholder @with_ring = with_ring @mask = mask super(**args) end |