Class: TurboOverlay::ModalConfig

Inherits:
OverlayTypeConfig show all
Defined in:
lib/turbo_overlay/configuration.rb

Overview

Modal config. Adds ‘advance` (URL advance / history.pushState on open; browser-back closes the top overlay). Default off. Per-link override via `advance: true | “/custom” | false` on `modal_link_to`.

Instance Attribute Summary collapse

Attributes inherited from OverlayTypeConfig

#variant

Instance Method Summary collapse

Constructor Details

#initialize(advance: false, **kwargs) ⇒ ModalConfig

Returns a new instance of ModalConfig.



19
20
21
22
# File 'lib/turbo_overlay/configuration.rb', line 19

def initialize(advance: false, **kwargs)
  super(**kwargs)
  @advance = advance
end

Instance Attribute Details

#advanceObject

Returns the value of attribute advance.



17
18
19
# File 'lib/turbo_overlay/configuration.rb', line 17

def advance
  @advance
end