Skip to content

Commit 2337855

Browse files
committed
Simplify classes in TableCell
1 parent 110df9c commit 2337855

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/table/components/TableCell.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ const TableCell: React.FC<TableCellProps> = ({
2424
useDevWarning(CellOutsideOfSectionWarning, () => section === TableSection.NONE);
2525

2626
const cellClass = section === TableSection.HEAD ? 'nhsuk-table__header' : 'nhsuk-table__cell';
27-
const numericHeader = isNumeric ? `${cellClass}--numeric` : '';
28-
const classes = classNames(cellClass, numericHeader, className)
27+
const classes = classNames(cellClass, { [`${cellClass}--numeric`]: isNumeric }, className);
2928

3029
switch (section) {
3130
case TableSection.HEAD:

0 commit comments

Comments
 (0)