fix(web): update search, listing, and map components
Improve agent profile client, comparison table, image gallery/upload, listing map, filter bar, property card, and search results components with better error handling, type safety, and UX refinements. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -84,12 +84,21 @@ export function ImageUpload({ images, onChange, maxFiles = 20, className }: Imag
|
||||
return (
|
||||
<div className={cn('space-y-4', className)}>
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onDragOver={handleDragOver}
|
||||
onDragLeave={handleDragLeave}
|
||||
onDrop={handleDrop}
|
||||
onClick={() => inputRef.current?.click()}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
inputRef.current?.click();
|
||||
}
|
||||
}}
|
||||
aria-label="Tải ảnh lên. Kéo thả ảnh vào đây hoặc nhấn để chọn"
|
||||
className={cn(
|
||||
'flex cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 transition-colors',
|
||||
'flex cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary',
|
||||
isDragging
|
||||
? 'border-primary bg-primary/5'
|
||||
: 'border-muted-foreground/25 hover:border-primary/50',
|
||||
|
||||
Reference in New Issue
Block a user