demarches-normaliennes/app/components/dsfr/toggle_component.rb
2024-03-11 15:48:28 +01:00

13 lines
382 B
Ruby

class Dsfr::ToggleComponent < ApplicationComponent
def initialize(form:, target:, title:, disabled: nil, hint: nil, toggle_labels: { checked: 'Activé', unchecked: 'Désactivé' }, opt: nil)
@form = form
@target = target
@title = title
@hint = hint
@disabled = disabled
@toggle_labels = toggle_labels
@opt = opt
end
attr_reader :toggle_labels
end