Class: Anchor::Page::HeaderComponent

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

Constant Summary collapse

BORDER_CLASSES =
%w(border-b border-subdued).freeze

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(border: false, **kwargs) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



6
7
8
9
# File 'app/components/anchor/page/header_component.rb', line 6

def initialize(border: false, **kwargs)
  @border = border
  super(**kwargs)
end

Instance Method Details

#render_title_and_action_row?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'app/components/anchor/page/header_component.rb', line 59

def render_title_and_action_row?
  title? || action? || action_menu? || badge?
end