Class: Practical::Views::ModalDialogComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Practical::Views::ModalDialogComponent
- Defined in:
- app/components/practical/views/modal_dialog_component.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#open ⇒ Object
Returns the value of attribute open.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #finalized_options ⇒ Object
-
#initialize(id:, open: false, options: {}) ⇒ ModalDialogComponent
constructor
A new instance of ModalDialogComponent.
Methods included from ElementHelper
Constructor Details
#initialize(id:, open: false, options: {}) ⇒ ModalDialogComponent
Returns a new instance of ModalDialogComponent.
7 8 9 10 11 |
# File 'app/components/practical/views/modal_dialog_component.rb', line 7 def initialize(id:, open: false, options: {}) self.open = open self.id = id self. = end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'app/components/practical/views/modal_dialog_component.rb', line 5 def id @id end |
#open ⇒ Object
Returns the value of attribute open.
5 6 7 |
# File 'app/components/practical/views/modal_dialog_component.rb', line 5 def open @open end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'app/components/practical/views/modal_dialog_component.rb', line 5 def @options end |
Instance Method Details
#finalized_options ⇒ Object
13 14 15 |
# File 'app/components/practical/views/modal_dialog_component.rb', line 13 def mix({id: id, open: open, data: {ensure_modal: true}, class: 'wa-dialog-stack-patch'}, ) end |