add enum for table item size

This commit is contained in:
jeffvli
2025-11-13 00:27:24 -08:00
parent 10085f9bd9
commit 8d1e78485c
@@ -75,6 +75,12 @@ const hasRequiredStateItemProperties = (
);
};
enum TableItemSize {
COMPACT = 40,
DEFAULT = 64,
LARGE = 88,
}
interface VirtualizedTableGridProps {
calculatedColumnWidths: number[];
CellComponent: JSXElementConstructor<CellComponentProps<TableItemProps>>;
@@ -684,7 +690,12 @@ export const ItemTableList = ({
}
}, []);
const DEFAULT_ROW_HEIGHT = size === 'compact' ? 40 : size === 'large' ? 88 : 64;
const DEFAULT_ROW_HEIGHT =
size === 'compact'
? TableItemSize.COMPACT
: size === 'large'
? TableItemSize.LARGE
: TableItemSize.DEFAULT;
const calculateScrollTopForIndex = useCallback(
(index: number) => {