Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d8863d3

Browse files
committedMar 17, 2023
refactor(CTable): improve syntax
1 parent 47874ac commit d8863d3

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed
 

‎packages/coreui-react/src/components/table/CTableBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const CTableBody = forwardRef<HTMLTableSectionElement, CTableBodyProps>(
2828
)
2929

3030
return (
31-
<tbody className={_className ? _className : undefined} {...rest} ref={ref}>
31+
<tbody className={_className} {...rest} ref={ref}>
3232
{children}
3333
</tbody>
3434
)

‎packages/coreui-react/src/components/table/CTableDataCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const CTableDataCell = forwardRef<HTMLTableCellElement, CTableDataCellPro
4646
const Component = rest.scope ? 'th' : 'td'
4747

4848
return (
49-
<Component className={_className ? _className : undefined} {...rest} ref={ref}>
49+
<Component className={_className} {...rest} ref={ref}>
5050
{children}
5151
</Component>
5252
)

‎packages/coreui-react/src/components/table/CTableFoot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const CTableFoot = forwardRef<HTMLTableSectionElement, CTableFootProps>(
2828
)
2929

3030
return (
31-
<tfoot className={_className ? _className : undefined} {...rest} ref={ref}>
31+
<tfoot className={_className} {...rest} ref={ref}>
3232
{children}
3333
</tfoot>
3434
)

‎packages/coreui-react/src/components/table/CTableHead.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const CTableHead = forwardRef<HTMLTableSectionElement, CTableHeadProps>(
2828
)
2929

3030
return (
31-
<thead className={_className ? _className : undefined} {...rest} ref={ref}>
31+
<thead className={_className} {...rest} ref={ref}>
3232
{children}
3333
</thead>
3434
)

‎packages/coreui-react/src/components/table/CTableHeaderCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const CTableHeaderCell = forwardRef<HTMLTableCellElement, CTableHeaderCel
2828
)
2929

3030
return (
31-
<th className={_className ? _className : undefined} {...rest} ref={ref}>
31+
<th className={_className} {...rest} ref={ref}>
3232
{children}
3333
</th>
3434
)

‎packages/coreui-react/src/components/table/CTableRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const CTableRow = forwardRef<HTMLTableRowElement, CTableRowProps>(
3838
)
3939

4040
return (
41-
<tr className={_className ? _className : undefined} {...rest} ref={ref}>
41+
<tr className={_className} {...rest} ref={ref}>
4242
{children}
4343
</tr>
4444
)

0 commit comments

Comments
 (0)
Please sign in to comment.