Class: Anchor::PanelComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Anchor::PanelComponent
show all
- Defined in:
- app/components/anchor/panel_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
#fetch_or_fallback
Constructor Details
#initialize(active: false, **kwargs) ⇒ PanelComponent
10
11
12
13
14
|
# File 'app/components/anchor/panel_component.rb', line 10
def initialize(active: false, **kwargs)
@active = active
super(**kwargs)
end
|
Instance Method Details
#active? ⇒ Boolean
16
17
18
|
# File 'app/components/anchor/panel_component.rb', line 16
def active?
@active == true
end
|
#testid ⇒ Object
20
21
22
|
# File 'app/components/anchor/panel_component.rb', line 20
def testid
wrapper_options.dig(:data, :testid) || "panel-component"
end
|