feat: make file icon in table smaller

This commit is contained in:
2025-09-15 23:04:38 +00:00
parent 5271064068
commit 060cbdbdf5
3 changed files with 16 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
export function DirectoryIcon() {
import { cn } from "@/lib/utils"
export function DirectoryIcon({ className }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -6,7 +8,10 @@ export function DirectoryIcon() {
height="24"
viewBox="0 0 24 24"
fill="currentColor"
className="icon icon-tabler icons-tabler-filled icon-tabler-folder text-orange-300"
className={cn(
"icon icon-tabler icons-tabler-filled icon-tabler-folder text-orange-300",
className,
)}
aria-label="Directory"
>
<title>Directory</title>

View File

@@ -1,4 +1,6 @@
export function TextFileIcon() {
import { cn } from "@/lib/utils"
export function TextFileIcon({ className }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -6,7 +8,10 @@ export function TextFileIcon() {
height="24"
viewBox="0 0 24 24"
fill="currentColor"
className="icon icon-tabler icons-tabler-filled icon-tabler-file-text text-blue-300"
className={cn(
"icon icon-tabler icons-tabler-filled icon-tabler-file-text text-blue-300",
className,
)}
>
<title>Text File</title>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />

View File

@@ -83,7 +83,7 @@ const columns: ColumnDef<DirectoryItem>[] = [
case "directory":
return (
<div className="flex items-center gap-2">
<DirectoryIcon />
<DirectoryIcon className="size-4" />
{row.original.doc.name}
</div>
)
@@ -364,7 +364,7 @@ function NewItemRow() {
function FileNameCell({ initialName }: { initialName: string }) {
return (
<div className="flex items-center gap-2">
<TextFileIcon />
<TextFileIcon className="size-4" />
{initialName}
</div>
)