Skip to content

Commit cf3b8ab

Browse files
authored
fix: set table row background color
1 parent d531d12 commit cf3b8ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react-notion-x/src/block.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,13 +786,14 @@ export const Block: React.FC<BlockProps> = (props) => {
786786
?.value as types.TableBlock
787787
const order = tableBlock.format?.table_block_column_order
788788
const formatMap = tableBlock.format?.table_block_column_format
789+
const backgroundColor = block.format?.block_color
789790

790791
if (!tableBlock || !order) {
791792
return null
792793
}
793794

794795
return (
795-
<tr className={cs('notion-simple-table-row', blockId)}>
796+
<tr className={cs('notion-simple-table-row', backgroundColor && `notion-${backgroundColor}`, blockId)}>
796797
{order.map((column) => {
797798
const color = formatMap?.[column]?.color
798799

0 commit comments

Comments
 (0)