feat: enhance FilesTable and Textarea components for improved user interaction and styling

- Updated the FileIcon in FilesTable to include a hover effect and click handler for file preview functionality.
- Adjusted the background color in Textarea for better visual consistency with the overall design.
This commit is contained in:
Daniel Luiz Alves
2025-07-03 01:49:11 -03:00
parent 0b87c6e803
commit 5e367b67fa
2 changed files with 8 additions and 2 deletions

View File

@@ -330,7 +330,13 @@ export function FilesTable({
</TableCell>
<TableCell className="h-12 px-4 border-0">
<div className="flex items-center gap-2">
<FileIcon className={`h-5 w-5 ${color}`} />
<FileIcon
className={`h-5.5 w-5.5 ${color} cursor-pointer hover:opacity-80 transition-opacity`}
onClick={(e) => {
e.stopPropagation();
onPreview(file);
}}
/>
<div
className="flex items-center gap-1 min-w-0 flex-1"
onMouseEnter={() => setHoveredField({ fileId: file.id, field: "name" })}

View File

@@ -10,7 +10,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(({ classNa
return (
<textarea
className={cn(
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
"flex min-h-[80px] w-full rounded-md border border-input bg-input/20 px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className
)}
ref={ref}