@@ -375,44 +375,52 @@ export default function Page() {
375375 multiple = { true }
376376 >
377377 { ( { getRootProps, getInputProps, isDragActive } ) => {
378- const pdfUploaded = files . some ( f => f . type === "application/pdf" ) ;
379- return (
380- < div
381- className = { `relative h-20 w-20 flex-shrink-0 touch-none group${
382- isDragActive || isGlobalDragging
383- ? "border-2 border-solid border-[#6D28D9]"
384- : ""
385- } `}
386- { ...( ! pdfUploaded ? getRootProps ( ) : { } ) }
387- >
388- { ! pdfUploaded && < input { ...getInputProps ( ) } /> }
389- < div className = { `absolute left-4 top-4 h-16 w-16 rounded-2xl bg-violet-950 ${ pdfUploaded ? "text-gray-500 cursor-not-allowed" : "text-white cursor-pointer" } ` } />
390- < div className = "absolute left-0 top-0 h-10 w-10 rounded-[20px] bg-violet-950" />
391- < div className = "absolute left-1 top-1 flex h-8 w-8 items-center rounded-[20px] bg-black/50" />
392- < div className = { `absolute left-9 top-9 text-2xl ${ pdfUploaded ? "text-gray-500 cursor-not-allowed" : "text-white cursor-pointer" } ` }
393- >
394- < div className = { `absolute text-2xl ${ pdfUploaded ? "text-gray-500 cursor-not-allowed" : "text-white cursor-pointer" } ` }
395- >
396- < FiPlus className = "h-7 w-7" />
397-
398- { pdfUploaded && ( < div className = "absolute left-12 top-1/2 -translate-y-1/2 whitespace-nowrap rounded-md bg-gradient-to-r from-indigo-900 to-violet-900 px-3 py-1 text-xs text-white shadow-lg opacity-0 group-hover:opacity-100 transition-all duration-300 group-hover:translate-x-1" >
399- Only one PDF file is permitted.
378+ const pdfUploaded = files . some (
379+ ( f ) => f . type === "application/pdf" ,
380+ ) ;
381+ return (
382+ < div
383+ className = { `relative h-20 w-20 flex-shrink-0 touch-none group${
384+ isDragActive || isGlobalDragging
385+ ? "border-2 border-solid border-[#6D28D9]"
386+ : ""
387+ } `}
388+ { ...( ! pdfUploaded ? getRootProps ( ) : { } ) }
389+ >
390+ { ! pdfUploaded && < input { ...getInputProps ( ) } /> }
391+ < div
392+ className = { `absolute left-4 top-4 h-16 w-16 rounded-2xl bg-[#A78BFA] dark:bg-violet-950 ${ pdfUploaded ? "cursor-not-allowed text-gray-500" : "cursor-pointer text-white" } ` }
393+ />
394+ < div className = "absolute left-0 top-0 h-10 w-10 rounded-[20px] bg-[#A78BFA] dark:bg-violet-950" />
395+
396+ < div className = "absolute left-1 top-1 flex h-8 w-8 items-center rounded-[20px] bg-black/30 dark:bg-black/50" />
397+ < div
398+ className = { `absolute left-9 top-9 text-2xl ${ pdfUploaded ? "cursor-not-allowed text-gray-500" : "cursor-pointer text-white" } ` }
399+ >
400+ < div
401+ className = { `absolute text-2xl ${ pdfUploaded ? "cursor-not-allowed text-gray-500" : "cursor-pointer text-white" } ` }
402+ >
403+ < FiPlus className = "h-7 w-7" />
404+
405+ { pdfUploaded && (
406+ < div className = "absolute left-12 top-1/2 -translate-y-1/2 whitespace-nowrap rounded-md bg-gradient-to-r from-indigo-900 to-violet-900 px-3 py-1 text-xs text-white opacity-0 shadow-lg transition-all duration-300 group-hover:translate-x-1 group-hover:opacity-100" >
407+ Only one PDF file is permitted.
408+ </ div >
409+ ) }
410+ </ div >
411+ </ div >
412+ < div className = "absolute left-4 top-3 text-xs font-semibold text-white" >
413+ { previews . length }
400414 </ div >
401- ) }
402- </ div >
403- </ div >
404- < div className = "absolute left-4 top-3 text-xs font-semibold text-white" >
405- { previews . length }
406415 </ div >
407- </ div >
408416 ) ;
409417 } }
410418 </ Dropzone >
411419 ) }
412420 { previews . length > 0 && (
413421 < section className = "mt-6 flex w-full flex-col items-center" >
414422 < div className = "flex w-max gap-4" >
415- < div className = "scrollbar-hide flex w-[80vw] max-w-4xl flex-col justify-between overflow-x-auto overflow-y-hidden rounded-[40px] border-[6px] border-indigo-900 bg-indigo-900/10 p-4 sm:p-6 md:w-max md:p-8" >
423+ < div className = "scrollbar-hide flex w-[80vw] max-w-4xl flex-col justify-between overflow-x-auto overflow-y-hidden rounded-[40px] border-[6px] border-[#A78BFA] bg-indigo-900/10 p-4 dark:border-indigo-900 sm:p-6 md:w-max md:p-8" >
416424 < DndContext
417425 sensors = { sensors }
418426 collisionDetection = { closestCenter }
@@ -493,7 +501,7 @@ export default function Page() {
493501 < Button
494502 onClick = { handleUpload }
495503 disabled = { isUploading || files . length === 0 }
496- className = "mt-8 rounded-[40px] bg-violet-950 px-8 py-3 text-xl text-white hover:bg-violet-800"
504+ className = "mt-8 rounded-[40px] bg-[#A78BFA] px-8 py-3 text-xl text-white hover:bg-[#8B5CF6] dark:bg-violet-950 dark: hover:bg-violet-800"
497505 >
498506 { isUploading ? "Uploading..." : "Upload" }
499507 </ Button >
0 commit comments