@@ -7,7 +7,13 @@ import { MllSpinnerIcon } from '../Spinner';
77import { ColumnLabel } from './ColumnLabel' ;
88import { RowLabel } from './RowLabel' ;
99import { Well } from './Well' ;
10- import { PLATE_FLOW } from './constants' ;
10+ import {
11+ GRID_GAP ,
12+ PLATE_FLOW ,
13+ ROW_LABEL_WIDTH ,
14+ WELL_COLUMN_WIDTH_COMPACT ,
15+ WELL_COLUMN_WIDTH_UNIFORM ,
16+ } from './constants' ;
1117import { CoordinateSystem , PlateProps } from './types' ;
1218import {
1319 allCoordinateSystemPositions ,
@@ -20,6 +26,7 @@ import {
2026export * from './constants' ;
2127export * from './coordinateSystem12x8' ;
2228export * from './coordinateSystem2x16' ;
29+ export * from './coordinateSystem6x4' ;
2330export * from './types' ;
2431export * from './utils' ;
2532export { GENERAL_WELL_STYLE } from './wellUtils' ;
@@ -30,6 +37,7 @@ export function Plate<TCoordinateSystem extends CoordinateSystem>({
3037 dndContextProps,
3138 isDraggable,
3239 loading,
40+ wellSizing = 'uniform' ,
3341} : PlateProps < TCoordinateSystem > ) {
3442 if ( data ) {
3543 assertUniquePositions ( data ) ;
@@ -50,10 +58,14 @@ export function Plate<TCoordinateSystem extends CoordinateSystem>({
5058 < div
5159 style = { {
5260 display : 'grid' ,
53- gridTemplateColumns : `1fr${ ' 4fr' . repeat (
54- coordinateSystem . columns . length ,
55- ) } `,
56- gridGap : '3px' ,
61+ gridTemplateColumns : `${ ROW_LABEL_WIDTH } repeat(${
62+ coordinateSystem . columns . length
63+ } , ${
64+ wellSizing === 'compact'
65+ ? WELL_COLUMN_WIDTH_COMPACT
66+ : WELL_COLUMN_WIDTH_UNIFORM
67+ } )`,
68+ gridGap : GRID_GAP ,
5769 } }
5870 >
5971 { /* takes up the space in the upper left corner between A and 1 */ }
0 commit comments