Sha256: 6dff572e77435146067508d7ba6f3e9f6b539fd1522830dfea891e3195e0d9ae

Contents?: true

Size: 427 Bytes

Versions: 14

Compression:

Stored size: 427 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    # :nodoc:
    class ToggleSwitch < BaseComponent
      delegate :builder, :form, to: :@input

      def initialize(input:)
        @input = input
        @input.add_label_classes("FormControl-label")
        @input.add_input_classes("FormControl-toggleSwitchInput")
        @input.input_arguments[:hidden] = "hidden" if @input.hidden?
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
primer_view_components-0.1.8 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.7 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.6 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.5 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.4 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.3 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.2 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.1 lib/primer/forms/toggle_switch.rb
primer_view_components-0.1.0 lib/primer/forms/toggle_switch.rb
primer_view_components-0.0.123 lib/primer/forms/toggle_switch.rb
primer_view_components-0.0.122 lib/primer/forms/toggle_switch.rb
primer_view_components-0.0.121 lib/primer/forms/toggle_switch.rb
primer_view_components-0.0.120 lib/primer/forms/toggle_switch.rb
primer_view_components-0.0.119 lib/primer/forms/toggle_switch.rb