Class: Anchor::ActionMenuComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/anchor/action_menu_component.rb

Constant Summary

Constants included from ViewHelper

ViewHelper::ANCHOR_HELPERS

Instance Method Summary collapse

Methods inherited from Component

generate_id

Methods included from ViewHelper

#anchor_form_with, #anchor_svg, #deep_blank?, #merge_options, #popover_trigger_attributes

Methods included from FetchOrFallbackHelper

#fetch_or_fallback

Constructor Details

#initialize(item_options: {}, **kwargs) ⇒ ActionMenuComponent

Returns a new instance of ActionMenuComponent.



14
15
16
17
18
# File 'app/components/anchor/action_menu_component.rb', line 14

def initialize(item_options: {}, **kwargs)
  @item_options = item_options

  super(id: self.class.generate_id, **kwargs)
end

Instance Method Details

#testidObject



20
21
22
# File 'app/components/anchor/action_menu_component.rb', line 20

def testid
  wrapper_options.dig(:data, :testid) || "action-menu"
end