Sha256: 11d7be0d1f9be5254484086c8dc324f13dff8a2bcd130fc45c3691506fb7befb
Contents?: true
Size: 854 Bytes
Versions: 8
Compression:
Stored size: 854 Bytes
Contents
# typed: false # frozen_string_literal: true module Ariadne module UI module Table module Cell class Component < Ariadne::BaseComponent attr_accessor :context accepts_html_attributes do |html_attrs| html_attrs[:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:cell), html_attrs[:class]].join(" ")) end def tag_name case context when :header "th" else "td" end end style :cell do base do [ "ariadne-p-4", "ariadne-align-middle", "[&:has([role=checkbox])]:ariadne-pr-0", "ariadne-font-medium", ] end end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems