Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bun.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"lockfileVersion": 1,
"configVersion": 0,
"workspaces": {
"": {
"name": "mux",
Expand Down
11 changes: 8 additions & 3 deletions src/components/ImageAttachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ export const ImageAttachments: React.FC<ImageAttachmentsProps> = ({ images, onRe
{images.map((image) => (
<div
key={image.id}
className="border-border-light bg-dark relative h-20 w-20 overflow-hidden rounded border"
className="border-border-light bg-dark group grid h-20 w-20 overflow-hidden rounded border"
>
<img src={image.url} alt="Attached image" className="h-full w-full object-cover" />
<img
src={image.url}
alt="Attached image"
className="pointer-events-none col-start-1 row-start-1 h-full w-full object-cover"
/>
<button
onClick={() => onRemove(image.id)}
title="Remove image"
className="absolute top-1 right-1 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border-0 bg-black/70 p-0 text-sm leading-none text-white hover:bg-black/90"
className="col-start-1 row-start-1 m-0.5 flex h-5 w-5 cursor-pointer items-center justify-center self-start justify-self-end rounded-full border-0 bg-black/70 p-0 text-sm leading-none text-white hover:bg-black/90"
aria-label="Remove image"
>
×
</button>
Expand Down