File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ export const TableRowColumn: FC<TableRowColumnProps> = (props) => {
223223 className : oClassNames ,
224224 width,
225225 children,
226+ scope,
226227 ...pprops
227228 } = props ;
228229 const style : CSSProperties = { } ;
@@ -238,11 +239,15 @@ export const TableRowColumn: FC<TableRowColumnProps> = (props) => {
238239 children
239240 ) ;
240241
241- return (
242- < td style = { style } className = { oClassNames } { ...pprops } >
243- { cellContent }
244- </ td >
245- ) ;
242+ const CellComponent = scope === 'row' ? 'th' : 'td' ;
243+ const cellProps = {
244+ style,
245+ className : oClassNames ,
246+ ...pprops ,
247+ ...( scope === 'row' ? { scope : 'row' } : { } ) ,
248+ } ;
249+
250+ return < CellComponent { ...cellProps } > { cellContent } </ CellComponent > ;
246251} ;
247252
248253/**
You can’t perform that action at this time.
0 commit comments