Sha256: 50fc582616eb9c331a8462e77efad8bd2c4ee9b98eaf27fa3ecda85502557150

Contents?: true

Size: 333 Bytes

Versions: 52

Compression:

Stored size: 333 Bytes

Contents

class ModalComponent < ViewComponent::Base
  def initialize(klass: 'modal-xl', id: nil, auto_show: true)
    @klass = klass
    @auto_show = auto_show
    @id = id
    @remove_on_hide = @auto_show

    super
  end

  def before_render
    return unless @auto_show

    controller.instance_variable_set(:@using_modal, true)
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
pg_rails-7.6.23 pg_engine/app/components/modal_component.rb
pg_rails-7.6.22 pg_engine/app/components/modal_component.rb
pg_rails-7.6.22.pre.3 pg_engine/app/components/modal_component.rb
pg_rails-7.6.22.pre.2 pg_engine/app/components/modal_component.rb
pg_rails-7.6.22.pre.1 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.11 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.10 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.9 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.8 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.7 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.6 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.5 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.4 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.3 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.2 pg_engine/app/components/modal_component.rb
pg_rails-7.6.21.pre.1 pg_engine/app/components/modal_component.rb
pg_rails-7.6.20 pg_engine/app/components/modal_component.rb
pg_rails-7.6.19 pg_engine/app/components/modal_component.rb
pg_rails-7.6.18 pg_engine/app/components/modal_component.rb