Refactor data table components for improved styling consistency
Publish telemt-api gateway Docker image / test (push) Successful in 27s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m25s

- Removed unnecessary background color from the data table toolbar for a cleaner look.
- Updated text color in sortable table headers to enhance readability and maintain a cohesive theme.
- Adjusted padding and border styles in user page components for better alignment and visual consistency.
This commit is contained in:
Denozordec
2026-03-31 19:27:23 +07:00
parent 9533241624
commit e4e164aee9
3 changed files with 7 additions and 8 deletions
@@ -13,7 +13,7 @@
<div <div
class={cn( class={cn(
'flex flex-wrap items-center justify-between gap-2 border-b border-border bg-muted/30 px-3 py-2', 'flex flex-wrap items-center justify-between gap-2 border-b border-border px-3 py-2',
className className
)} )}
> >
@@ -26,7 +26,7 @@
<Table.Head <Table.Head
class={cn( class={cn(
'px-3 py-2 text-left align-middle text-sm font-medium text-foreground', 'px-3 py-2 text-left align-middle text-sm font-medium text-muted-foreground',
numeric && 'text-right', numeric && 'text-right',
className className
)} )}
@@ -35,9 +35,10 @@
type="button" type="button"
class={cn( class={cn(
'inline-flex max-w-full items-center gap-1.5 rounded-md', 'inline-flex max-w-full items-center gap-1.5 rounded-md',
'text-foreground/90 transition-colors', 'text-muted-foreground transition-colors',
'hover:bg-accent/60 hover:text-foreground', 'hover:bg-accent/60 hover:text-foreground',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/45', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/45',
active && 'text-foreground',
numeric && 'ms-auto' numeric && 'ms-auto'
)} )}
onclick={onToggle} onclick={onToggle}
+3 -5
View File
@@ -392,9 +392,7 @@
<DataTableCard> <DataTableCard>
{#snippet toolbar()} {#snippet toolbar()}
<div class="border-b border-border"> <div class="border-b border-border">
<div <div class="flex flex-wrap items-center justify-between gap-2 px-3 py-2.5">
class="flex flex-wrap items-center justify-between gap-2 bg-muted/30 px-3 py-2.5"
>
<Tabs.Root bind:value={usersViewTab} class="w-full min-w-0 sm:w-auto"> <Tabs.Root bind:value={usersViewTab} class="w-full min-w-0 sm:w-auto">
<Tabs.List class="h-auto min-h-8 w-full flex-wrap justify-start gap-1 p-1 sm:w-fit"> <Tabs.List class="h-auto min-h-8 w-full flex-wrap justify-start gap-1 p-1 sm:w-fit">
<Tabs.Trigger value="all" class="shrink-0 gap-1.5 px-2.5 py-1 text-xs sm:text-sm"> <Tabs.Trigger value="all" class="shrink-0 gap-1.5 px-2.5 py-1 text-xs sm:text-sm">
@@ -418,7 +416,7 @@
{/if} {/if}
</div> </div>
<div <div
class="flex flex-wrap items-center justify-between gap-2 border-t border-border/60 bg-muted/30 px-3 py-2" class="flex flex-wrap items-center justify-between gap-2 border-t border-border/60 px-3 py-2"
> >
<div class="relative max-w-sm min-w-[200px] flex-1"> <div class="relative max-w-sm min-w-[200px] flex-1">
<SearchIcon <SearchIcon
@@ -484,7 +482,7 @@
>Имя</SortableTh> >Имя</SortableTh>
<Table.Head <Table.Head
class={cn( class={cn(
'px-3 py-2 text-left align-middle text-sm font-medium text-foreground', 'px-3 py-2 text-left align-middle text-sm font-medium text-muted-foreground',
!showColLinks && 'hidden', !showColLinks && 'hidden',
showColLinks && 'hidden sm:table-cell' showColLinks && 'hidden sm:table-cell'
)} )}