quality / changes (push) Successful in 8s
quality / api (push) Skipped
quality / commitlint (push) Skipped
quality / docker-check (push) Skipped
quality / web (push) Successful in 1m2s
CD / quality (push) Successful in 1m12s
CD / publish (push) Successful in 1m31s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
27 lines
1012 B
TypeScript
27 lines
1012 B
TypeScript
import type { DataGridFeatures, DataGridProps } from '@/components/reui/data-grid/data-grid'
|
|
|
|
export const DATA_GRID_CELL_PAD = 'py-3'
|
|
export const DATA_GRID_CELL_PAD_FIRST = 'pl-5 py-3'
|
|
export const DATA_GRID_CELL_PAD_LAST = 'pr-4 py-3'
|
|
|
|
export const DATA_GRID_LAYOUT: NonNullable<DataGridProps<DataGridFeatures, object>['tableLayout']> = {
|
|
rowBorder: true,
|
|
headerBackground: true,
|
|
headerBorder: true,
|
|
columnsResizable: false,
|
|
}
|
|
|
|
export const DATA_GRID_CLASS_NAMES: NonNullable<DataGridProps<DataGridFeatures, object>['tableClassNames']> = {
|
|
headerRow: 'border-b border-border',
|
|
bodyRow: 'group/row',
|
|
}
|
|
|
|
export const DATA_GRID_CONTAINER_CLASS = 'w-full rounded-none border-0'
|
|
|
|
/** Отступы ячейки по положению колонки: первая — pl-5, последняя — pr-4. */
|
|
export function cellPad(index: number, count: number) {
|
|
if (index === 0) return DATA_GRID_CELL_PAD_FIRST
|
|
if (index === count - 1) return DATA_GRID_CELL_PAD_LAST
|
|
return DATA_GRID_CELL_PAD
|
|
}
|