feat: templates

This commit is contained in:
Ephraim Atta-Duncan
2023-10-06 22:54:24 +00:00
committed by Mythie
parent 6d34ebd91b
commit 31a9127c9e
55 changed files with 2834 additions and 34 deletions

View File

@@ -75,10 +75,20 @@ const DocumentDropzoneCardCenterVariants: Variants = {
},
};
const DocumentDescription = {
document: {
headline: 'Add a document',
},
template: {
headline: 'Upload Template Document',
},
};
export type DocumentDropzoneProps = {
className?: string;
disabled?: boolean;
onDrop?: (_file: File) => void | Promise<void>;
type?: 'document' | 'template';
[key: string]: unknown;
};
@@ -86,6 +96,7 @@ export const DocumentDropzone = ({
className,
onDrop,
disabled,
type = 'document',
...props
}: DocumentDropzoneProps) => {
const { getRootProps, getInputProps } = useDropzone({
@@ -157,7 +168,7 @@ export const DocumentDropzone = ({
<input {...getInputProps()} />
<p className="group-hover:text-foreground text-muted-foreground mt-8 font-medium">
Add a document
{DocumentDescription[type].headline}
</p>
<p className="text-muted-foreground/80 mt-1 text-sm ">Drag & drop your document here.</p>