Class: DaisyUI::Card::Actions
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- DaisyUI::Card::Actions
- Defined in:
- app/components/daisy_ui/data_display/card/actions.rb
Overview
Actions component for the card, handling action buttons layout
Constant Summary collapse
- JUSTIFY_OPTIONS =
Available justification options for actions layout
{ start: 'justify-start', end: 'justify-end', center: 'justify-center', between: 'justify-between', around: 'justify-around', evenly: 'justify-evenly' }.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(justify: nil, **system_arguments) ⇒ Actions
constructor
A new instance of Actions.
Constructor Details
#initialize(justify: nil, **system_arguments) ⇒ Actions
Returns a new instance of Actions.
54 55 56 57 |
# File 'app/components/daisy_ui/data_display/card/actions.rb', line 54 def initialize(justify: nil, **system_arguments) @justify = build_justify(justify) super(**system_arguments) end |
Instance Method Details
#call ⇒ Object
59 60 61 62 63 64 65 66 67 |
# File 'app/components/daisy_ui/data_display/card/actions.rb', line 59 def call tag.div(**html_attributes) do if actions.any? safe_join(actions) else content end end end |