File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
packages/react-notion-x/src Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -790,6 +790,7 @@ export function Block(props: BlockProps) {
790
790
const backgroundColor = block . format ?. block_color
791
791
792
792
const hasRowHeader = tableBlock . format ?. table_block_column_header === true
793
+ const hasColumnHeader = tableBlock . format ?. table_block_row_header === true
793
794
794
795
const isHeaderRow = hasRowHeader && tableBlock . content ?. [ 0 ] === block . id
795
796
@@ -806,13 +807,18 @@ export function Block(props: BlockProps) {
806
807
blockId
807
808
) }
808
809
>
809
- { order . map ( ( column ) => {
810
+ { order . map ( ( column , columnIndex ) => {
810
811
const color = formatMap ?. [ column ] ?. color
811
812
813
+ const isHeaderColumn = hasColumnHeader && columnIndex === 0
814
+
812
815
return (
813
816
< td
814
817
key = { column }
815
- className = { color ? `notion-${ color } ` : '' }
818
+ className = { cs (
819
+ color ? `notion-${ color } ` : '' ,
820
+ isHeaderColumn && 'notion-simple-table-header-cell'
821
+ ) }
816
822
style = { {
817
823
width : formatMap ?. [ column ] ?. width || 120
818
824
} }
Original file line number Diff line number Diff line change @@ -2672,10 +2672,17 @@ svg.notion-page-icon {
2672
2672
font-size : 14px ;
2673
2673
}
2674
2674
2675
+ /* simple table header */
2676
+ /* row header */
2675
2677
.notion-simple-table-header-row td {
2676
2678
background : var (--bg-color-0 );
2677
2679
}
2678
2680
2681
+ /* column header */
2682
+ .notion-simple-table-header-cell {
2683
+ background : var (--bg-color-0 );
2684
+ }
2685
+
2679
2686
.notion-simple-table td {
2680
2687
border : 1px solid var (--fg-color-5 );
2681
2688
padding : 8px 8px ;
You can’t perform that action at this time.
0 commit comments