Class: Anchor::DialogComponent
- Defined in:
- app/components/anchor/dialog_component.rb
Constant Summary collapse
- POSITION_DEFAULT =
:center
- POSITION_OPTIONS =
[POSITION_DEFAULT, :right].freeze
Constants included from ViewHelper
Instance Method Summary collapse
-
#initialize(id:, title:, position: POSITION_DEFAULT, **kwargs) ⇒ DialogComponent
constructor
A new instance of DialogComponent.
Methods inherited from Component
Methods included from ViewHelper
#anchor_form_with, #anchor_svg, #deep_blank?, #merge_options, #popover_trigger_attributes
Methods included from FetchOrFallbackHelper
Constructor Details
#initialize(id:, title:, position: POSITION_DEFAULT, **kwargs) ⇒ DialogComponent
Returns a new instance of DialogComponent.
20 21 22 23 24 25 26 27 28 |
# File 'app/components/anchor/dialog_component.rb', line 20 def initialize(id:, title:, position: POSITION_DEFAULT, **kwargs) @id = id @title = title @position = fetch_or_fallback( POSITION_OPTIONS, position, POSITION_DEFAULT ) super(id:, **kwargs) end |