Files
openfoodnetwork/app/components/out_of_stock_modal_component.rb
Gaetan Craig-Riou 4a2f22e56d Add OutOfStockModalComponent
It encapsulate the logic for the out of stock modal
2025-02-18 10:47:03 +11:00

11 lines
246 B
Ruby

# frozen_string_literal: true
class OutOfStockModalComponent < ModalComponent
def initialize(id:, variants: [], redirect: false)
super(id:, modal_class: "medium", instant: true)
@variants = variants
@redirect = redirect
end
end