Class: Kanso::ModalComponent::HeaderComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/kanso/modal_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



39
40
41
42
# File 'app/components/kanso/modal_component.rb', line 39

def initialize(title:)
  @title = title
  @title_id = "modal-title-#{SecureRandom.hex(4)}"
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



37
38
39
# File 'app/components/kanso/modal_component.rb', line 37

def title
  @title
end

#title_idObject (readonly)

Returns the value of attribute title_id.



37
38
39
# File 'app/components/kanso/modal_component.rb', line 37

def title_id
  @title_id
end

Instance Method Details

#callObject



44
45
46
# File 'app/components/kanso/modal_component.rb', line 44

def call
  content
end