Class: Avo::ModalComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Avo::ModalComponent
- Defined in:
- app/components/avo/modal_component.rb
Instance Method Summary collapse
Instance Method Details
#ctrl ⇒ Object
30 |
# File 'app/components/avo/modal_component.rb', line 30 def ctrl = stimulus_controller |
#has_header? ⇒ Boolean
26 27 28 |
# File 'app/components/avo/modal_component.rb', line 26 def has_header? @title.present? || @description.present? || heading? || @show_close_button end |
#height_classes ⇒ Object
22 23 24 |
# File 'app/components/avo/modal_component.rb', line 22 def height_classes "max-h-[calc(100dvh-5rem)] min-h-1/4" end |
#stimulus_controller ⇒ Object
18 19 20 |
# File 'app/components/avo/modal_component.rb', line 18 def stimulus_controller (@behavior == :persistent) ? "persistent-modal" : "modal" end |