Sha256: fc88be9168b1df0348eb64d98cc216d05a7c58e7932818d465f88af61096026f

Contents?: true

Size: 337 Bytes

Versions: 10

Compression:

Stored size: 337 Bytes

Contents

module Tenon
  module StyleguideHelper
    def color_spans(arr, join = ', ')
      arr.map{|c| color_span(c)}.join(join).html_safe
    end

    def color_span(color)
      content_tag(:span, color, class: "color-#{color}")
    end

    def expandable_toggle
      link_to i('keyboard_arrow_down'), '#', class: 'expand'
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tenon-2.1.0 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.8 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.7 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.6 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.5 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.4 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.3 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.2 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.1 app/helpers/tenon/styleguide_helper.rb
tenon-2.0.0 app/helpers/tenon/styleguide_helper.rb