Class: LightningUiKit::ModalComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- LightningUiKit::ModalComponent
- Defined in:
- app/components/lightning_ui_kit/modal_component.rb
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(id:, title:, description: nil, open: false, **options) ⇒ ModalComponent
constructor
A new instance of ModalComponent.
Methods inherited from BaseComponent
Methods included from HeroiconHelper
Constructor Details
#initialize(id:, title:, description: nil, open: false, **options) ⇒ ModalComponent
Returns a new instance of ModalComponent.
5 6 7 8 9 10 11 |
# File 'app/components/lightning_ui_kit/modal_component.rb', line 5 def initialize(id:, title:, description: nil, open: false, **) @id = id @title = title @description = description @open = open @options = end |
Instance Method Details
#data ⇒ Object
13 14 15 16 17 18 |
# File 'app/components/lightning_ui_kit/modal_component.rb', line 13 def data { controller: "lui-modal", lui_modal_target: "dialog" }.merge(@options[:data] || {}) end |