Sha256: cdb807022b7c4b7b3f79eec22315a404154440a59bdd2885d3db36a482a85582

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

module Wallaby
  module Resources
    module Index
      # Html cell
      class ColorHtml < Cell
        # @return [String]
        def render
          if value.nil?
            null
          else
            concat content_tag(:span, nil, style: "background-color: #{value};", class: 'color-square')
            content_tag(:span, value, class: 'text-uppercase')
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wallaby-6.0.2 app/views/wallaby/resources/index/color_html.rb
wallaby-6.0.1 app/views/wallaby/resources/index/color_html.rb