Sha256: fb9501c72a8f2beae368ca29c16d6965813eda9252b59ec15260724facf1ce0c

Contents?: true

Size: 536 Bytes

Versions: 211

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module ERBLint
  module Linters
    module ArgumentMappers
      # Maps attributes in the clipboard-copy element to arguments for the ClipboardCopy component.
      class ClipboardCopy < Base
        DEFAULT_TAG = "clipboard-copy"
        ATTRIBUTES = %w[role tabindex for value id style].freeze

        def attribute_to_args(attribute)
          attr_name = attribute.name

          { attr_name.to_sym => erb_helper.convert(attribute) }
        end
      end
    end
  end
end

Version data entries

211 entries across 211 versions & 3 rubygems

Version Path
primer_view_components-0.36.5 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.52.2 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.36.4 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.52.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.52.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.36.3 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.51.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.36.2 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.50.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.50.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.36.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.36.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.49.2 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.35.2 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.49.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.49.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.35.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.35.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.48.2 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.48.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb