Skip to content

Commit 3ca84e7

Browse files
authored
Style data cells in punctuation inventory (#1794)
Style data cells in punctuation inventory https://paratextstudio.atlassian.net/browse/PT-3432
1 parent 1152f14 commit 3ca84e7

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

extensions/src/platform-scripture/src/checks/inventories/punctuation-inventory.component.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,23 @@ const createColumns = (
4545
onUnapprovedItemsChange: (items: string[]) => void,
4646
): ColumnDef<InventoryTableData>[] => {
4747
return [
48-
inventoryItemColumn(itemLabel),
48+
{
49+
...inventoryItemColumn(itemLabel),
50+
cell: ({ row }) => (
51+
<div className="tw-text-lg tw-font-bold tw-font-mono tw-flex tw-justify-center">
52+
{row.getValue('item')}
53+
</div>
54+
),
55+
},
4956
{
5057
accessorKey: 'unicodeValue',
5158
header: () => <Button variant="ghost">{unicodeValueLabel}</Button>,
52-
cell: ({ row }) => {
53-
const item: string = row.getValue('item');
54-
return item.charCodeAt(0).toString(16).toUpperCase().padStart(4, '0');
55-
},
59+
// Q: How to style the <td> and <th> directly?
60+
cell: ({ row }) => (
61+
<div className="tw-font-mono tw-flex tw-justify-center">
62+
{String(row.getValue('item')).charCodeAt(0).toString(16).toUpperCase().padStart(4, '0')}
63+
</div>
64+
),
5665
},
5766
inventoryCountColumn(countLabel),
5867
inventoryStatusColumn(

0 commit comments

Comments
 (0)