demarches-normaliennes/app/components/dsfr/input_status_message_component.rb
mfo 35c92ee906
feat(champs.errors.format): better format for error below champs
Co-authored-by: Corinne Durrmeyer <corinne@inseo.fr>
2024-04-12 11:50:43 +02:00

14 lines
381 B
Ruby

module Dsfr
class InputStatusMessageComponent < ApplicationComponent
def initialize(errors_on_attribute:, error_full_messages:, described_by:, champ:)
@errors_on_attribute = errors_on_attribute
@error_full_messages = error_full_messages
@described_by = described_by
@champ = champ
end
def render?
@errors_on_attribute
end
end
end