Class: Impulse::Popover::HeaderComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Impulse::Popover::HeaderComponent
- Defined in:
- app/components/impulse/popover/header_component.rb
Instance Method Summary collapse
-
#initialize(title: nil, **system_args) ⇒ HeaderComponent
constructor
A new instance of HeaderComponent.
- #render? ⇒ Boolean
Methods inherited from ApplicationComponent
Methods included from Helpers::AttributesHelper
Constructor Details
#initialize(title: nil, **system_args) ⇒ HeaderComponent
Returns a new instance of HeaderComponent.
4 5 6 7 8 9 10 11 12 |
# File 'app/components/impulse/popover/header_component.rb', line 4 def initialize(title: nil, **system_args) @title = title @system_args = system_args @system_args[:tag] = :div @system_args[:class] = class_names( system_args[:class], "popover-header" ) end |
Instance Method Details
#render? ⇒ Boolean
14 15 16 |
# File 'app/components/impulse/popover/header_component.rb', line 14 def render? content.present? || @title.present? end |