From bc1d653857d849bb321610269a56e27089e23bab Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 30 May 2023 16:17:17 +0200 Subject: [PATCH] chore(Table): split preset for `th` and `td` --- src/runtime/app.config.ts | 16 ++++++++++++++-- src/runtime/components/data/Table.vue | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/runtime/app.config.ts b/src/runtime/app.config.ts index f04e36d9..047dc31b 100644 --- a/src/runtime/app.config.ts +++ b/src/runtime/app.config.ts @@ -9,8 +9,20 @@ const table = { base: '', selected: 'bg-gray-50 dark:bg-gray-800/50' }, - th: 'px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white', - td: 'whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-400', + th: { + base: '', + padding: 'px-3 py-3.5', + color: 'text-gray-900 dark:text-white', + font: 'font-semibold', + size: 'text-sm' + }, + td: { + base: 'whitespace-nowrap', + padding: 'px-3 py-4', + color: 'text-gray-500 dark:text-gray-400', + font: '', + size: 'text-sm' + }, default: { sortAscIcon: 'i-heroicons-bars-arrow-up-20-solid', sortDescIcon: 'i-heroicons-bars-arrow-down-20-solid', diff --git a/src/runtime/components/data/Table.vue b/src/runtime/components/data/Table.vue index 68ac0594..b0027441 100644 --- a/src/runtime/components/data/Table.vue +++ b/src/runtime/components/data/Table.vue @@ -7,7 +7,7 @@ - + - + {{ row[column.key] }}