From 1c33eba83471b55c052c12f2877e1cf27435c69e Mon Sep 17 00:00:00 2001 From: Ardeman Date: Mon, 24 Mar 2025 13:52:31 +0800 Subject: [PATCH] feat: enhance table styling in ContentsPage with additional class names for better readability --- app/pages/dashboard-contents/index.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/app/pages/dashboard-contents/index.tsx b/app/pages/dashboard-contents/index.tsx index 7f7a130..d269d23 100644 --- a/app/pages/dashboard-contents/index.tsx +++ b/app/pages/dashboard-contents/index.tsx @@ -48,12 +48,13 @@ export const ContentsPage = () => { title: 'Penulis', data: 'author', }, - { title: 'Judul', data: 'title' }, + { title: 'Judul', data: 'title', className: 'text-sm' }, { title: 'Kategori', data: 'categories', + className: 'text-xs', }, - { title: 'Tag', data: 'tags' }, + { title: 'Tag', data: 'tags', className: 'text-xs' }, { title: 'Subscription', data: 'is_premium', @@ -66,18 +67,14 @@ export const ContentsPage = () => { const dataSlot: DataTableSlots = { 1: (value: string) => formatDate(value), 2: (value: TAuthorResponse) => ( -
+ <>
{value.name}
ID: {value.id.slice(0, 8)}
-
- ), - 3: (value: string) => {value}, - 4: (value: TCategoryResponse[]) => ( -
{value.map((item) => item.name).join(', ')}
- ), - 5: (value: TTagResponse[]) => ( -
{value.map((item) => item.name).join(', ')}
+ ), + 4: (value: TCategoryResponse[]) => + value.map((item) => item.name).join(', '), + 5: (value: TTagResponse[]) => value.map((item) => item.name).join(', '), 6: (value: string) => value ? (