Class: UiComponents::DaisyUi::Action::Modal::DialogComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- UiComponents::DaisyUi::Action::Modal::DialogComponent
- Defined in:
- app/components/ui_components/daisy_ui/action/modal/dialog_component.rb
Constant Summary collapse
- CSS_CLASSES_DEFAULT =
%w[modal].freeze
- CSS_CLASSES =
( %w[modal-backdrop] + CSS_CLASSES_DEFAULT + Dialog::BoxComponent::CSS_CLASSES ).freeze
Constants inherited from BaseComponent
BaseComponent::ALIGNS, BaseComponent::AXES, BaseComponent::COLORS, BaseComponent::CSS_CLASSES_VARIANTS, BaseComponent::KINDS, BaseComponent::SIZES
Instance Method Summary collapse
-
#initialize(backdrop: false, opener:, **args) ⇒ DialogComponent
constructor
A new instance of DialogComponent.
- #set_options ⇒ Object
Constructor Details
#initialize(backdrop: false, opener:, **args) ⇒ DialogComponent
Returns a new instance of DialogComponent.
28 29 30 31 32 33 34 35 36 37 |
# File 'app/components/ui_components/daisy_ui/action/modal/dialog_component.rb', line 28 def initialize( backdrop: false, opener:, **args ) @backdrop = backdrop @opener = opener super(**args) end |
Instance Method Details
#set_options ⇒ Object
39 40 41 42 43 44 |
# File 'app/components/ui_components/daisy_ui/action/modal/dialog_component.rb', line 39 def @options.merge!(class: class_string) @options.merge!(style: @css_style) if @css_style.present? @options.merge!(id: @opener) @options.compact_blank! end |