Sha256: 9ad1b55c6c3828ea0d9f70f73219474530167d7ffd4b90d8e41a8161c9b8eece
Contents?: true
Size: 756 Bytes
Versions: 11
Compression:
Stored size: 756 Bytes
Contents
# frozen_string_literal: true using Katalyst::HtmlAttributes::HasHtmlAttributes module Koi module Tables class HeaderCellComponent < Katalyst::Tables::HeaderCellComponent attr_reader :width def initialize(table, attribute, label: nil, link: {}, width: nil, **html_attributes) @width = width super(table, attribute, label:, link:, **html_attributes) end def default_html_attributes super.merge_html(class: width_class) end private def width_class case width when :xs "width-xs" when :s "width-s" when :m "width-m" when :l "width-l" else "" end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems