adapt table compact mode

This commit is contained in:
pa
2026-01-07 00:08:48 +09:00
committed by Natsumi
parent 08c2499fa0
commit c0cb01a117
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -8,7 +8,9 @@
<template> <template>
<div data-slot="table-container" class="relative w-full"> <div data-slot="table-container" class="relative w-full">
<table data-slot="table" :class="cn('w-full caption-bottom text-[13px]', props.class)"> <table
data-slot="table"
:class="cn('w-full caption-bottom text-[13px] in-[.is-compact-table]:text-[12px]', props.class)">
<slot /> <slot />
</table> </table>
</div> </div>
+1 -1
View File
@@ -11,7 +11,7 @@
data-slot="table-cell" data-slot="table-cell"
:class=" :class="
cn( cn(
'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', 'p-2 align-middle whitespace-nowrap in-[.is-compact-table]:py-1! in-[.is-compact-table]:px-2.5! [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-0.5',
props.class props.class
) )
"> ">
+1 -1
View File
@@ -11,7 +11,7 @@
data-slot="table-head" data-slot="table-head"
:class=" :class="
cn( cn(
'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap in-[.is-compact-table]:h-8! in-[.is-compact-table]:px-2.5! [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-0.5',
props.class props.class
) )
"> ">