Skip to main content

Type Alias: CellPart

CellPart = { alt: string; height: number; id: string; kind: "logo" | "wordmark" | "headshot"; src: string; text?: string; type: "image"; } | { num: string; size: string; suffix: string; type: "rank"; }

Defined in: packages/sdvtables/src/tanstack-table.ts:31

A cell sdvtables draws as more than text, as data: render turns it into the caller's framework markup.

Union Members​

Type Literal​

{ alt: string; height: number; id: string; kind: "logo" | "wordmark" | "headshot"; src: string; text?: string; type: "image"; }

alt​

readonly alt: string

The team's name for a mark; "" for a headshot, which is decorative (the player's name sits in its row).

height​

readonly height: number

px

id​

readonly id: string

The resolved team id or the player id, as the HTML table's data-sdv-id.

kind​

readonly kind: "logo" | "wordmark" | "headshot"

"logo" and "wordmark": a team's mark; "headshot": a player's photo.

src​

readonly src: string

text?​

readonly optional text?: string

A logo column with includeName: the cell's text, drawn after the image.

type​

readonly type: "image"


Type Literal​

{ num: string; size: string; suffix: string; type: "rank"; }

num​

readonly num: string

size​

readonly size: string

suffix​

readonly suffix: string

type​

readonly type: "rank"

A rank with superscript (the default): num then suffix in a <sup> of size ("1", "st").