Skip to content

Commit 578bb73

Browse files
refactor: Update PdfViewer styles for improved UI consistency (#1478)
- Changed border and background colors in the PdfViewer component to use a primary color scheme. - Updated loading and file icons to reflect the new color theme. - Minor adjustments to text prompts for clarity during file upload interactions. These changes enhance the visual consistency of the PDF upload interface. Co-authored-by: Mariano Fuentes <[email protected]>
1 parent d45f03c commit 578bb73

File tree

1 file changed

+7
-7
lines changed
  • apps/app/src/app/(app)/[orgId]/policies/[policyId]/components

1 file changed

+7
-7
lines changed

apps/app/src/app/(app)/[orgId]/policies/[policyId]/components/PdfViewer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ export function PdfViewer({ policyId, pdfUrl, isPendingApproval }: PdfViewerProp
158158
className={cn(
159159
'cursor-pointer rounded-md border-2 border-dashed p-4 text-center transition-colors',
160160
isDragActive
161-
? 'border-emerald-400 bg-emerald-50 dark:border-emerald-500 dark:bg-emerald-950/20'
162-
: 'border-emerald-200 hover:border-emerald-300 dark:border-emerald-800 dark:hover:border-emerald-700',
161+
? 'border-primary bg-primary/10 dark:border-primary dark:bg-primary/10'
162+
: 'border-primary/30 hover:border-primary/50 dark:border-primary/30 dark:hover:border-primary/50',
163163
isUploading && 'pointer-events-none opacity-60',
164164
)}
165165
>
@@ -191,16 +191,16 @@ export function PdfViewer({ policyId, pdfUrl, isPendingApproval }: PdfViewerProp
191191
className={cn(
192192
'flex cursor-pointer flex-col items-center justify-center space-y-4 rounded-md border-2 border-dashed p-12 text-center transition-colors',
193193
isDragActive
194-
? 'border-emerald-400 bg-emerald-50 dark:border-emerald-500 dark:bg-emerald-950/20'
195-
: 'border-emerald-200 hover:border-emerald-300 dark:border-emerald-800 dark:hover:border-emerald-700',
194+
? 'border-primary bg-primary/10 dark:border-primary dark:bg-primary/10'
195+
: 'border-primary/30 hover:border-primary/50 dark:border-primary/30 dark:hover:border-primary/50',
196196
isUploading && 'pointer-events-none opacity-60',
197197
)}
198198
>
199199
<input {...getInputProps()} />
200200
{isUploading ? (
201-
<Loader2 className="h-12 w-12 animate-spin text-emerald-600 dark:text-emerald-400" />
201+
<Loader2 className="h-12 w-12 animate-spin text-primary" />
202202
) : (
203-
<FileText className="h-12 w-12 text-emerald-600 dark:text-emerald-400" />
203+
<FileText className="h-12 w-12 text-primary" />
204204
)}
205205
<h3 className="text-lg font-semibold">
206206
{isUploading
@@ -214,7 +214,7 @@ export function PdfViewer({ policyId, pdfUrl, isPendingApproval }: PdfViewerProp
214214
? 'Please wait while we upload your PDF.'
215215
: isDragActive
216216
? 'Release to upload your PDF.'
217-
: 'Drag and drop a PDF here or click to browse (up to 100MB).'}
217+
: 'Drag and drop a PDF here or click to browse (up to 100MB)'}
218218
</p>
219219
</div>
220220
)}

0 commit comments

Comments
 (0)