Skip to content

Commit

Permalink
fix ui related issue
Browse files Browse the repository at this point in the history
  • Loading branch information
YehualashetGit committed Oct 26, 2023
1 parent 74ea0c2 commit 9622285
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
8 changes: 5 additions & 3 deletions apps/web/components/ui/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function DataTable<TData, TValue>({
})

return (
<Table>
<Table className='border-transparent bg-light--theme-light dark:bg-dark--theme-light mt-8 w-full'>
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (
<TableRow key={headerGroup.id}>
Expand All @@ -97,10 +97,12 @@ function DataTable<TData, TValue>({
<TableRow
key={row.id}
data-state={row.getIsSelected() && "selected"}
className="mb-4 border-b border-gray-200"
className='my-4'
>
{row.getVisibleCells().map((cell) => (
<TableCell key={cell.id}>
<TableCell key={cell.id}
className="rounded-[16px] my-4">

{flexRender(
cell.column.columnDef.cell,
cell.getContext()
Expand Down
19 changes: 10 additions & 9 deletions apps/web/components/ui/table.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from "react"

import { cn } from "lib/utils"
import { clsxm } from '@app/utils';


const Table = React.forwardRef<
HTMLTableElement,
Expand All @@ -9,7 +10,7 @@ const Table = React.forwardRef<
<div className="relative w-full overflow-auto">
<table
ref={ref}
className={cn("w-full caption-bottom text-sm", className)}
className={clsxm("w-full caption-bottom text-sm", className)}
{...props}
/>
</div>
Expand All @@ -20,7 +21,7 @@ const TableHeader = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
<thead ref={ref} className={clsxm("[&_tr]:border-b", className)} {...props} />
))
TableHeader.displayName = "TableHeader"

Expand All @@ -30,7 +31,7 @@ const TableBody = React.forwardRef<
>(({ className, ...props }, ref) => (
<tbody
ref={ref}
className={cn("[&_tr:last-child]:border-0", className)}
className={clsxm("[&_tr:last-child]:border-0", className)}
{...props}
/>
))
Expand All @@ -42,7 +43,7 @@ const TableFooter = React.forwardRef<
>(({ className, ...props }, ref) => (
<tfoot
ref={ref}
className={cn("bg-primary font-medium text-primary-foreground", className)}
className={clsxm("bg-primary font-medium text-primary-foreground", className)}
{...props}
/>
))
Expand All @@ -54,7 +55,7 @@ const TableRow = React.forwardRef<
>(({ className, ...props }, ref) => (
<tr
ref={ref}
className={cn(
className={clsxm(
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
className
)}
Expand All @@ -69,7 +70,7 @@ const TableHead = React.forwardRef<
>(({ className, ...props }, ref) => (
<th
ref={ref}
className={cn(
className={clsxm(
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
className
)}
Expand All @@ -84,7 +85,7 @@ const TableCell = React.forwardRef<
>(({ className, ...props }, ref) => (
<td
ref={ref}
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
className={clsxm("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
{...props}
/>
))
Expand All @@ -96,7 +97,7 @@ const TableCaption = React.forwardRef<
>(({ className, ...props }, ref) => (
<caption
ref={ref}
className={cn("mt-4 text-sm text-muted-foreground", className)}
className={clsxm("mt-4 text-sm text-muted-foreground", className)}
{...props}
/>
))
Expand Down
5 changes: 3 additions & 2 deletions apps/web/lib/features/team-member-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function WorkedOnTaskCell({ row }: { row: any }) {
memberInfo={memberInfo}
task={memberInfo?.memberTask}
isAuthUser={memberInfo?.isAuthUser}
className="2xl:w-48 3xl:w-[12rem] w-1/5 lg:px-4 px-2 flex flex-col gap-y-[1.125rem] justify-center"
className="2xl:w-32 3xl:w-[8rem] w-1/5 flex flex-col gap-y-[1.125rem] justify-center"
/>
);
}
Expand Down Expand Up @@ -95,7 +95,8 @@ export function ActionMenuCell ({ cell }: { cell: any}) {
checked={user_selected()}
className={clsxm(
'border-none w-4 h-4 mr-1 accent-primary-light',
'border-2 border-primary-light'
'border-2 border-primary-light',
'2xl:w-[2rem] w-1/5'
)}
noWrapper={true}
onChange={onUserSelect}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { MainHeader, MainLayout } from 'lib/layout';
import { useTranslation } from 'react-i18next';
import { useState } from 'react';
import { IssuesView } from '@app/constants';
import { TableCellsIcon, ListBulletIcon } from '@heroicons/react/24/solid';
import { TableCellsIcon, QueueListIcon } from '@heroicons/react/24/solid';

function MainPage() {
const { t } = useTranslation();
Expand Down Expand Up @@ -55,7 +55,7 @@ function MainPage() {
)}
onClick={() => setView(IssuesView.TABLE)}
>
<ListBulletIcon className="w-5 h-5 inline -ml-1 mr-1" />
<QueueListIcon className="w-5 h-5 inline -ml-1 mr-1" />
</button>
</div>
</div>
Expand Down

0 comments on commit 9622285

Please sign in to comment.