Sha256: c97bc2e631ea74dc9e6929f85d9373d208f515280b745a1d761daa3e023be8ab

Contents?: true

Size: 660 Bytes

Versions: 3

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

module Phlexi
  module Table
    module Components
      module Concerns
        module DisplaysHeader
          extend ActiveSupport::Concern

          def header_cell
            HeaderCell.new(label)
          end

          def header_cell_attributes
            attributes = @attributes.dup
            attributes[:id] = "#{dom_id}_header_cell"
            attributes[:class] = tokens(
              attributes[:class],
              themed(:"align_#{alignment}"),
              themed(:"#{type}_column")
            )
            attributes
          end

          def colspan = 1
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phlexi-table-0.0.5 lib/phlexi/table/components/concerns/displays_header.rb
phlexi-table-0.0.4 lib/phlexi/table/components/concerns/displays_header.rb
phlexi-table-0.0.3 lib/phlexi/table/components/concerns/displays_header.rb