Class: Impulse::Dialog::HeaderComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/impulse/dialog/header_component.rb

Instance Method Summary collapse

Methods inherited from ApplicationComponent

generate_id

Methods included from Helpers::AttributesHelper

#merge_attributes

Constructor Details

#initialize(title:, title_id: nil, **system_args) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



4
5
6
7
8
9
10
11
12
13
# File 'app/components/impulse/dialog/header_component.rb', line 4

def initialize(title:, title_id: nil, **system_args)
  @title = title
  @title_id = title_id
  @system_args = system_args
  @system_args[:tag] = :div
  @system_args[:class] = class_names(
    system_args[:class],
    "awc-dialog-header"
  )
end