File tree Expand file tree Collapse file tree 4 files changed +5
-9
lines changed
packages/bento-design-system/src Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ export type TableConfig = {
1010 headerForegroundColor : BentoSprinkles [ "color" ] ;
1111 hintPlacement : TooltipPlacement ;
1212 cellTooltipPlacement : TooltipPlacement ;
13+ evenRowsBackgroundColor : BentoSprinkles [ "background" ] ;
1314} ;
Original file line number Diff line number Diff line change @@ -56,10 +56,6 @@ export const cellContainerRecipe = strictRecipe({
5656 justifyContent : "center" ,
5757 } ) ,
5858 variants : {
59- even : {
60- true : bentoSprinkles ( { background : "backgroundSecondary" } ) ,
61- false : bentoSprinkles ( { background : "backgroundPrimary" } ) ,
62- } ,
6359 firstColumn : {
6460 true : bentoSprinkles ( { paddingLeft : 8 } ) ,
6561 } ,
Original file line number Diff line number Diff line change @@ -487,14 +487,12 @@ function CellContainer({
487487 first : boolean ;
488488 last : boolean ;
489489} & TableCellProps ) {
490+ const tableConfig = useBentoConfig ( ) . table ;
490491 return (
491492 < Box className = { lastLeftSticky && lastLeftStickyColumn } style = { style } >
492493 < Box
493- className = { cellContainerRecipe ( {
494- even : index % 2 === 0 ,
495- firstColumn : first ,
496- lastColumn : last ,
497- } ) }
494+ background = { index % 2 === 0 ? tableConfig . evenRowsBackgroundColor : "backgroundPrimary" }
495+ className = { cellContainerRecipe ( { firstColumn : first , lastColumn : last } ) }
498496 { ...props }
499497 >
500498 { children }
Original file line number Diff line number Diff line change @@ -464,6 +464,7 @@ export const table: TableConfig = {
464464 headerForegroundColor : undefined ,
465465 hintPlacement : "top" ,
466466 cellTooltipPlacement : "bottom" ,
467+ evenRowsBackgroundColor : "backgroundSecondary" ,
467468} ;
468469
469470export const toast : ToastConfig = {
You can’t perform that action at this time.
0 commit comments