mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
11 lines
354 B
Ruby
11 lines
354 B
Ruby
# frozen_string_literal: true
|
|
|
|
class MultipleCheckedSelectComponent < ViewComponent::Base
|
|
def initialize(name:, options:, selected:, filter_placeholder: "Filter options")
|
|
@name = name
|
|
@filter_placeholder = filter_placeholder
|
|
@options = options.map { |option| [option[0], option[1].to_sym] }
|
|
@selected = selected.map(&:to_sym)
|
|
end
|
|
end
|