Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
studio: polish asset grid (#10788)
Browse files Browse the repository at this point in the history
* update asset grid

* add padding

* set bg color for selected asset

---------

Co-authored-by: Rahul Ghosh <ghoshr698@gmail.com>
  • Loading branch information
achen5671 and SYBIOTE authored Aug 1, 2024
1 parent 50165b6 commit 64e4502
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,18 @@ const ResourceFile = (props: {
})
}
onContextMenu={handleContextMenu}
className={`flex cursor-pointer flex-col items-center justify-center align-middle ${
selected ? 'border border-gray-100' : ''
}`}
className="mb-2 flex cursor-pointer flex-col items-center justify-center align-middle"
>
<span className="mb-[5px] h-[70px] w-[70px] text-[70px]">
<span
className={`mb-[5px] h-40 w-40 text-[70px] ${
selected ? 'rounded-lg border border-blue-primary bg-theme-studio-surface' : ''
}`}
>
<FileIcon thumbnailURL={resource.thumbnailURL} type={assetType} />
</span>

<Tooltip title={name}>
<span className="line-clamp-1 w-full text-wrap break-all text-sm text-white">{name}</span>
<span className="line-clamp-1 w-full text-wrap break-all text-sm text-[#F5F5F5]">{name}</span>
</Tooltip>

<ContextMenu anchorEvent={anchorEvent} onClose={() => setAnchorEvent(undefined)} className="gap-1">
Expand Down Expand Up @@ -624,7 +626,7 @@ const AssetPanel = () => {
onSelectCategory={handleSelectCategory}
/>
<div className="flex h-full w-full flex-col overflow-auto">
<div className="grid flex-1 grid-cols-3 gap-2 overflow-auto p-2">
<div className="grid grid-cols-[repeat(auto-fit,minmax(170px,1fr))] gap-2 p-2">
<ResourceItems />
</div>
<div className="mx-auto mb-10">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const FileIcon = ({
alt=""
/>
) : FallbackIcon ? (
<FallbackIcon className={`${color}`} />
<FallbackIcon className={`${color} h-full w-full p-4`} />
) : (
<>
<TbFileDescription className={`${color}`} />
Expand Down

0 comments on commit 64e4502

Please sign in to comment.