Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / THEME_ROW_HEIGHT

Variable: THEME_ROW_HEIGHT

const THEME_ROW_HEIGHT: Record<GridTheme, Record<GridDensity, number>>

Defined in: datagrid-react/src/types.ts:270

Row height per theme and density.

This table exists in JS and not in CSS for the same reason DENSITY_ROW_HEIGHT does: the row height is a CORE value — the virtualizer computes every row offset and the scroll extent from it — so it has to reach the engine as a number. Everything else a theme changes about the rhythm (header height, cell padding, type scale, control sizes) is CSS's, and lives only there, so the two can never hold different opinions about the same measurement.

Keep in sync with the --dg-header-height values in DataGridThemes.css.