diff --git a/packages/ui/lib/document-dropzone-constants.ts b/packages/ui/lib/document-dropzone-constants.ts
index 7d611f24a..dd12acf97 100644
--- a/packages/ui/lib/document-dropzone-constants.ts
+++ b/packages/ui/lib/document-dropzone-constants.ts
@@ -67,18 +67,19 @@ export const DocumentDropzoneCardCenterVariants: Variants = {
export const DocumentDropzoneDisabledCardLeftVariants: Variants = {
initial: {
- x: 40,
+ x: 50,
y: 0,
rotate: -14,
},
animate: {
- x: 40,
+ x: 50,
y: 0,
rotate: -14,
},
hover: {
x: 30,
y: 0,
+ rotate: -17,
transition: { type: 'spring', duration: 0.3, stiffness: 500 },
},
};
@@ -86,17 +87,18 @@ export const DocumentDropzoneDisabledCardLeftVariants: Variants = {
export const DocumentDropzoneDisabledCardRightVariants: Variants = {
initial: {
x: -50,
- y: 5,
+ y: 0,
rotate: 14,
},
animate: {
x: -50,
- y: 5,
+ y: 0,
rotate: 14,
},
hover: {
- x: -40,
- y: 5,
+ x: -30,
+ y: 0,
+ rotate: 17,
transition: { type: 'spring', duration: 0.3, stiffness: 500 },
},
};
@@ -111,9 +113,8 @@ export const DocumentDropzoneDisabledCardCenterVariants: Variants = {
y: 0,
},
hover: {
- x: -20,
+ x: [-15, -10, -5, -10],
y: 0,
- rotate: -5,
transition: { type: 'spring', duration: 0.3, stiffness: 1000 },
},
};
diff --git a/packages/ui/primitives/document-dropzone.tsx b/packages/ui/primitives/document-dropzone.tsx
index e4ca84892..51c2f0141 100644
--- a/packages/ui/primitives/document-dropzone.tsx
+++ b/packages/ui/primitives/document-dropzone.tsx
@@ -6,7 +6,7 @@ import { motion } from 'framer-motion';
import { AlertTriangle, Plus } from 'lucide-react';
import { useDropzone } from 'react-dropzone';
-import { APP_DOCUMENT_UPLOAD_SIZE_LIMIT } from '@documenso/lib/constants/app';
+import { APP_DOCUMENT_UPLOAD_SIZE_LIMIT, IS_BILLING_ENABLED } from '@documenso/lib/constants/app';
import { megabytesToBytes } from '@documenso/lib/universal/unit-convertions';
import {
@@ -37,18 +37,10 @@ export const DocumentDropzone = ({
onDrop,
onDropRejected,
disabled,
- disabledMessage = 'You can upload up to 5 documents per month on your current plan.',
+ disabledMessage = 'You cannot upload documents at this time.',
type = 'document',
...props
}: DocumentDropzoneProps) => {
- const DocumentDescription = {
- document: {
- headline: disabled ? 'You have reached your document limit.' : 'Add a document',
- },
- template: {
- headline: 'Upload Template Document',
- },
- };
const { getRootProps, getInputProps } = useDropzone({
accept: {
'application/pdf': ['.pdf'],
@@ -68,26 +60,31 @@ export const DocumentDropzone = ({
maxSize: megabytesToBytes(APP_DOCUMENT_UPLOAD_SIZE_LIMIT),
});
+ const heading = {
+ document: disabled ? 'You have reached your document limit.' : 'Add a document',
+ template: 'Upload Template Document',
+ };
+
return (
- {DocumentDescription[type].headline} {heading[type]}
- {disabled ? disabledMessage : 'Drag & drop your PDF here.'}
-
+ {disabled ? disabledMessage : 'Drag & drop your PDF here.'} +
+ + {disabled && IS_BILLING_ENABLED() && ( + + )} + + + ); };