Sha256: 6ed14707f2e50597dc553ce028d51a79b4b435cb556c94d6c5e2d442fa556775

Contents?: true

Size: 463 Bytes

Versions: 59

Compression:

Stored size: 463 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module ClipboardHelper
    # A helper to create a clipboard.js button https://clipboardjs.com/
    def clipboard_button_for(target, width: "13rem")
      content_tag :button,
                  data: { "clipboard-action" => "copy", "clipboard-target" => target },
                  class: "button compact low-key clipboard-btn" do
        image_tag "renalware/clippy.svg", width: width
      end
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
renalware-core-2.0.149 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.148 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.147 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.146 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.145 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.144 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.143 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.142 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.141 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.140 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.139 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.138 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.137 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.136 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.135 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.134 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.133 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.132 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.131 app/helpers/renalware/clipboard_helper.rb
renalware-core-2.0.130 app/helpers/renalware/clipboard_helper.rb