Sha256: 4c46be2e130f46e2fdee12bafe447414623841b0e18d9ecaecbaa77797caf952

Contents?: true

Size: 614 Bytes

Versions: 16

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    module Dsl
      # :nodoc:
      class ToggleSwitchInput < Input
        attr_reader :name, :label, :src, :csrf

        def initialize(
          name:,
          label:,
          src:,
          csrf: nil,
          **system_arguments
        )
          @name = name
          @label = label
          @src = src
          @csrf = csrf

          super(**system_arguments)
        end

        def to_component
          ToggleSwitch.new(input: self)
        end

        def type
          :toggle_switch
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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