demarches-normaliennes/app/components/application_component.rb

8 lines
215 B
Ruby
Raw Normal View History

class ApplicationComponent < ViewComponent::Base
include ViewComponent::Translatable
def class_names(class_names)
class_names.to_a.filter_map { |(class_name, flag)| class_name if flag }.join(' ')
end
end