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
openproject-primer_view_components-0.33.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.25.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.32.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.32.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.29.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.29.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.23.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.28.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.28.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.27.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.26.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.25.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.22.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.21.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.25.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.24.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.21.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.20.1 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
primer_view_components-0.20.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
openproject-primer_view_components-0.23.0 lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb