Skip to content

Commit 31d5cfa

Browse files
committed
Enhance ImageGrid component by updating button visibility for delete actions; adjust styles for mobile and desktop responsiveness, improving user experience and accessibility.
1 parent d7b0fc4 commit 31d5cfa

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/components/ImageGrid.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,22 @@ const ImageGrid = ({ label, urlToRedirect }: props) => {
117117
{label}
118118
</Button>
119119
<Button
120-
className="cursor-pointer"
120+
className="hidden cursor-pointer md:flex"
121121
variant="destructive"
122122
size="icon"
123123
onClick={() => handleDeleteClick(image.id)}
124124
>
125125
<Trash />
126126
</Button>
127127
</div>
128+
<Button
129+
className="absolute top-0 right-0 flex cursor-pointer flex-col items-center justify-center gap-2 md:hidden"
130+
variant="destructive"
131+
size="icon"
132+
onClick={() => handleDeleteClick(image.id)}
133+
>
134+
<Trash />
135+
</Button>
128136
</div>
129137
))}
130138
</div>

0 commit comments

Comments
 (0)