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