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) {
790790 const backgroundColor = block . format ?. block_color
791791
792792 const hasRowHeader = tableBlock . format ?. table_block_column_header === true
793+ const hasColumnHeader = tableBlock . format ?. table_block_row_header === true
793794
794795 const isHeaderRow = hasRowHeader && tableBlock . content ?. [ 0 ] === block . id
795796
@@ -806,13 +807,18 @@ export function Block(props: BlockProps) {
806807 blockId
807808 ) }
808809 >
809- { order . map ( ( column ) => {
810+ { order . map ( ( column , columnIndex ) => {
810811 const color = formatMap ?. [ column ] ?. color
811812
813+ const isHeaderColumn = hasColumnHeader && columnIndex === 0
814+
812815 return (
813816 < td
814817 key = { column }
815- className = { color ? `notion-${ color } ` : '' }
818+ className = { cs (
819+ color ? `notion-${ color } ` : '' ,
820+ isHeaderColumn && 'notion-simple-table-header-cell'
821+ ) }
816822 style = { {
817823 width : formatMap ?. [ column ] ?. width || 120
818824 } }
Original file line number Diff line number Diff line change @@ -2672,10 +2672,17 @@ svg.notion-page-icon {
26722672 font-size : 14px ;
26732673}
26742674
2675+ /* simple table header */
2676+ /* row header */
26752677.notion-simple-table-header-row td {
26762678 background : var (--bg-color-0 );
26772679}
26782680
2681+ /* column header */
2682+ .notion-simple-table-header-cell {
2683+ background : var (--bg-color-0 );
2684+ }
2685+
26792686.notion-simple-table td {
26802687 border : 1px solid var (--fg-color-5 );
26812688 padding : 8px 8px ;
You can’t perform that action at this time.
0 commit comments