Skip to content

Commit

Permalink
Fixed thumb z-index issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DocMoebiuz committed Oct 17, 2024
1 parent 191c6aa commit 0a2086f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export function DataTable<TData, TValue>({
</div>
<div className="flex flex-col grow overflow-y-auto border rounded-lg">
<Table className="table-fixed">
<TableHeader className="group/header">
<TableHeader className="group/header z-10">
{table.getHeaderGroups().map((headerGroup) => (
<TableRow key={headerGroup.id} className="">
{headerGroup.headers.map((header) => {
return (
<TableHead key={header.id} className={`z-50 sticky top-0 ${(header.column.columnDef?.meta as {className:string})?.className ?? ""}`}>
<TableHead key={header.id} className={`sticky top-0 ${(header.column.columnDef?.meta as {className:string})?.className ?? ""}`}>
{header.isPlaceholder
? null
: flexRender(
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ui/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
className
)}
{...props}
ref={ref}
>
<SwitchPrimitives.Thumb
className={cn(
"pointer-events-none block h-5 w-5 dark:data-[state=checked]:bg-slate-800 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
)}
/>
</SwitchPrimitives.Root>
Expand Down

0 comments on commit 0a2086f

Please sign in to comment.