Sha256: 8ea2babf229d0435a0e20e77d2f2918a748d2a869f93216cab00e480df6452fb

Contents?: true

Size: 968 Bytes

Versions: 7

Compression:

Stored size: 968 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Design
    module ShareHelper
      def share_sections
        [
          {
            id: "usage",
            contents: [
              {
                type: :text,
                values: ["Make sure the partial <code>decidim/shared/share_modal</code> is present in the DOM. This partial is placed in the application layout."]
              },
              {
                type: :table,
                options: { headings: ["Share Button"] },
                items: share_table({}),
                cell_snippet: {
                  cell: "decidim/share_button",
                  args: []
                }
              }
            ]
          }
        ]
      end

      def share_table(*table_rows, **_opts)
        table_rows.each_with_index.map do
          row = []
          row << { method: :cell, args: ["decidim/share_button", nil] }
          row
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-design-0.28.4 app/helpers/decidim/design/share_helper.rb
decidim-design-0.28.3 app/helpers/decidim/design/share_helper.rb
decidim-design-0.28.2 app/helpers/decidim/design/share_helper.rb
decidim-design-0.28.1 app/helpers/decidim/design/share_helper.rb
decidim-design-0.28.0 app/helpers/decidim/design/share_helper.rb
decidim-design-0.28.0.rc5 app/helpers/decidim/design/share_helper.rb
decidim-design-0.28.0.rc4 app/helpers/decidim/design/share_helper.rb