Class: Kanso::ModalComponent::HeaderComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Kanso::ModalComponent::HeaderComponent
- Defined in:
- app/components/kanso/modal_component.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#title_id ⇒ Object
readonly
Returns the value of attribute title_id.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(title:) ⇒ HeaderComponent
constructor
A new instance of HeaderComponent.
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
#title ⇒ Object (readonly)
Returns the value of attribute title.
37 38 39 |
# File 'app/components/kanso/modal_component.rb', line 37 def title @title end |
#title_id ⇒ Object (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
#call ⇒ Object
44 45 46 |
# File 'app/components/kanso/modal_component.rb', line 44 def call content end |