Sha256: 7a9b96757fcc498d57dd41683e7ac722577ca33939fdcfdf8150df597e5e9223
Contents?: true
Size: 740 Bytes
Versions: 4
Compression:
Stored size: 740 Bytes
Contents
# frozen_string_literal: true class FoxTail::Table::HeaderComponent < FoxTail::BaseComponent renders_many :columns, lambda { |options = {}| options = options.merge self.options options[:theme] = theme.theme :column options[:tag] = :th options[:scope] = :col FoxTail::Table::ColumnComponent.new options } has_option :highlight, default: :none has_option :hover, type: :boolean, default: false has_option :border, type: :boolean, default: true def before_render super html_attributes[:class] = classnames theme.apply(:root, self), html_class end def render? columns? end def call content_tag :tr, html_attributes do columns.each { |column| concat column } end end end
Version data entries
4 entries across 4 versions & 1 rubygems