Class: Anchor::Panel::HeaderComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/anchor/panel/header_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:, **kwargs) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



4
5
6
7
8
# File 'app/components/anchor/panel/header_component.rb', line 4

def initialize(active:, **kwargs)
  @active = active

  super(**kwargs)
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/components/anchor/panel/header_component.rb', line 10

def active?
  @active == true
end