1
0
Fork 0

make SumaryTableCell prop name match markdown name for heading

pull/1409/head
Aaron Paterson 2023-04-24 10:03:36 -06:00 committed by GitHub
parent 457303960f
commit e22f3192bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -14,10 +14,17 @@ export interface SummaryTableCell {
*/
data: string
/**
* Render cell as header
* @deprecated use `core.summary`
* Render cell as heading
* (optional) default: false
*/
header?: boolean
/**
* @deprecated use `core.summary`
* Render cell as heading
* (optional) default: false
*/
heading?: boolean
/**
* Number of columns the cell extends
* (optional) default: '1'
@ -235,8 +242,8 @@ class Summary {
return this.wrap('td', cell)
}
const {header, data, colspan, rowspan} = cell
const tag = header ? 'th' : 'td'
const {header, heading, data, colspan, rowspan} = cell
const tag = (header || heading) ? 'th' : 'td'
const attrs = {
...(colspan && {colspan}),
...(rowspan && {rowspan})