[resumes][feat] improve UI for submit box

pull/386/head
Keane Chan 2 years ago
parent b885e3445f
commit 71838f4ac7
No known key found for this signature in database
GPG Key ID: 32718398E1E9F87C

@ -8,7 +8,7 @@ import type { FileRejection } from 'react-dropzone';
import { useDropzone } from 'react-dropzone'; import { useDropzone } from 'react-dropzone';
import type { SubmitHandler } from 'react-hook-form'; import type { SubmitHandler } from 'react-hook-form';
import { useForm } from 'react-hook-form'; import { useForm } from 'react-hook-form';
import { PaperClipIcon } from '@heroicons/react/24/outline'; import { ArrowUpCircleIcon } from '@heroicons/react/24/outline';
import { import {
Button, Button,
CheckboxInput, CheckboxInput,
@ -303,34 +303,29 @@ export default function SubmitResumeForm({
fileUploadError fileUploadError
? 'border-danger-600' ? 'border-danger-600'
: 'border-gray-300', : 'border-gray-300',
'mt-2 flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6', 'mt-2 flex cursor-pointer justify-center rounded-md border-2 border-dashed bg-gray-100 px-6 pt-5 pb-6',
)}> )}>
<div className="space-y-1 text-center"> <div className="space-y-1 text-center">
<div className="flex gap-2">
{resumeFile == null ? ( {resumeFile == null ? (
<PaperClipIcon className="m-auto h-8 w-8 text-gray-600" /> <ArrowUpCircleIcon className="m-auto h-10 w-10 text-indigo-500" />
) : ( ) : (
<div className="flex gap-2">
<p <p
className="cursor-pointer underline underline-offset-1 hover:text-indigo-600" className="cursor-pointer underline underline-offset-1 hover:text-indigo-600"
onClick={onClickDownload}> onClick={onClickDownload}>
{resumeFile.name} {resumeFile.name}
</p> </p>
</div>
)} )}
</div>
<div className="flex justify-center text-sm"> <div className="flex justify-center text-sm">
<label <label
className="rounded-md focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2" className="rounded-md focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2"
htmlFor="file-upload"> htmlFor="file-upload">
<div className="flex gap-1 "> <p className="mt-2 font-medium">Drop files here</p>
<p className="cursor-pointer font-medium text-indigo-600 hover:text-indigo-400"> <div className="mt-2 mb-1 flex justify-center gap-1">
<span className="font-light">or</span>
<span className="cursor-pointer font-medium text-indigo-600 hover:text-indigo-400">
{resumeFile == null {resumeFile == null
? 'Upload a file' ? 'Select file'
: 'Replace file'} : 'Replace file'}
</p>
<span className="text-gray-500">
or drag and drop
</span> </span>
</div> </div>
<input <input

Loading…
Cancel
Save