Class: Anchor::PanelComponent

Inherits:
Component
  • Object
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

Methods included from FetchOrFallbackHelper

#fetch_or_fallback

Constructor Details

#initialize(active: false, **kwargs) ⇒ PanelComponent

Returns a new instance of 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

Returns:

  • (Boolean)


16
17
18
# File 'app/components/anchor/panel_component.rb', line 16

def active?
  @active == true
end