fix(components): add unoptimized image prop, overflow containment, and accessibility
Add unoptimized prop to image preview to support blob URLs, contain overflow on preview container, replace div with semantic section element in DragDropContainer with aria-label, and import shared image constants.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { ReactNode } from "react";
|
||||
import type { ReactNode } from "react";
|
||||
import { toast } from "sonner";
|
||||
|
||||
const IMAGE_EXTENSIONS = [".png", ".jpg", ".jpeg", ".webp"];
|
||||
import { IMAGE_EXTENSIONS } from "@/lib/constants";
|
||||
|
||||
const getFileType = (file: File): "ics" | "image" | null => {
|
||||
const name = file.name.toLowerCase();
|
||||
@@ -53,7 +52,8 @@ export const DragDropContainer = ({
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
<section
|
||||
aria-label="Drag and drop file import area"
|
||||
onDragOver={handleDragOver}
|
||||
onDragLeave={handleDragLeave}
|
||||
onDrop={handleDrop}
|
||||
@@ -67,6 +67,6 @@ export const DragDropContainer = ({
|
||||
Drag & Drop *.ics or an event screenshot here
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user