Header cell

On a branch in the app

Port of Ui::HeaderCellComponent from roastertools-app's origin/jon-dev-3250-shared-list-controls branch (app/components/ui/header_cell_component.{rb,html.erb}). One list-table header cell: optional width, platform mark and a flex row so every header control sits on the same vertical centreline. Overlaps TableHeaderCell in Table (conflict 12); kept verbatim for the branch review so the app can collapse the two later. Classes are the branch's verbatim with tw- stripped (px-4 py-3 font-semibold, flex items-center gap-2, the mark's h-5 w-5). width_classes → width_className; image_tag → <img>. The branch sets no text size, colour or case on the cell: the header row supplies them (Payments uses uppercase text-sm, which is text-ui-xs here). No Stimulus: the cell is static markup.

App: Ui::HeaderCellComponent (origin/jon-dev-3250-shared-list-controls)

Plain cells with a width

#plain

Three cells: px-4 py-3 font-semibold with the content in a flex items-center row. The row's classes (text-ui-xs uppercase tracking-wider text-stone) give them size, case and colour; the cell adds none. width_className fixes the Date column at w-40.

Customer
Date
Amount
Hillside Food Co-opFeb 4, 2026$1,245.00
Nolan's BakeryFeb 3, 2026$3,890.50

Platform mark

#mark

mark renders a 20px <img> (the app's image_tag) before the content with gap-2, and mark_label is its alt and title, so a platform column (a Shopify order source) is identified by its brand mark on the same centreline as the text.

ShopifyShopify order
Date
Amount
Hillside Food Co-opFeb 4, 2026$1,245.00
Nolan's BakeryFeb 3, 2026$3,890.50

Regular weight

#light

semibold={false} drops font-semibold, for a secondary header row or a cell whose content sets its own weight; title puts a tooltip on the <th>.

Customer
Date
Amount
Hillside Food Co-opFeb 4, 2026$1,245.00
Nolan's BakeryFeb 3, 2026$3,890.50

Props

NameTypeDefaultNotes
width_classNamestring—A width class on the <th>, e.g. "w-40" (the app's width_classes)
markstring—A platform mark's image src, e.g. "/icons/brands/shopify.svg"
mark_labelstring—The mark's alt and title
titlestring—The <th>'s title attribute
semiboldbooleantruefont-semibold on the cell
gapboolean—gap-2 between the mark and the content. Defaults to whether there is a mark
classNamestring—On the <th>, after the width and padding classes
childrenReactNode—The header content, inside the flex row
...propsThHTMLAttributes—Other <th> attributes (scope, aria-sort, colSpan) pass through