Skip to content

The Open Source DocuSign Alternative.

chore: field fonts (#1350)

Ephraim Duncan318149fbf30f
diff --git a/apps/web/src/components/document/document-read-only-fields.tsx b/apps/web/src/components/document/document-read-only-fields.tsx
index cbf566b25..84b77e0d5 100644
--- a/apps/web/src/components/document/document-read-only-fields.tsx
+++ b/apps/web/src/components/document/document-read-only-fields.tsx
@@ -89,7 +89,7 @@ export const DocumentReadOnlyFields = ({ documentMeta, fields }: DocumentReadOnl
className="h-full w-full object-contain dark:invert"
/>
) : (
- <p className="font-signature text-muted-foreground text-lg duration-200 sm:text-xl md:text-2xl lg:text-3xl">
+ <p className="font-signature text-muted-foreground text-lg duration-200 sm:text-xl md:text-2xl">
{field.Signature?.typedSignature}
</p>
),
@@ -122,7 +122,7 @@ export const DocumentReadOnlyFields = ({ documentMeta, fields }: DocumentReadOnl
{field.Recipient.signingStatus === SigningStatus.NOT_SIGNED && (
<p
className={cn('text-muted-foreground text-lg duration-200', {
- 'font-signature sm:text-xl md:text-2xl lg:text-3xl':
+ 'font-signature sm:text-xl md:text-2xl':
field.type === FieldType.SIGNATURE ||
field.type === FieldType.FREE_SIGNATURE,
})}
diff --git a/packages/ui/primitives/document-flow/show-field-item.tsx b/packages/ui/primitives/document-flow/show-field-item.tsx
index 4e4a0dc99..5cc2885d6 100644
--- a/packages/ui/primitives/document-flow/show-field-item.tsx
+++ b/packages/ui/primitives/document-flow/show-field-item.tsx
@@ -1,14 +1,24 @@
'use client';
+import { Caveat } from 'next/font/google';
+
import type { Prisma } from '@prisma/client';
import { createPortal } from 'react-dom';
import { useFieldPageCoords } from '@documenso/lib/client-only/hooks/use-field-page-coords';
+import { FieldType } from '@documenso/prisma/client';
import { cn } from '../../lib/utils';
import { Card, CardContent } from '../card';
import { FRIENDLY_FIELD_TYPE } from './types';
+const fontCaveat = Caveat({
+ weight: ['500'],
+ subsets: ['latin'],
+ display: 'swap',
+ variable: '--font-caveat',
+});
+
export type ShowFieldItemProps = {
field: Prisma.FieldGetPayload<null>;
recipients: Prisma.RecipientGetPayload<null>[];
@@ -33,7 +43,8 @@ export const ShowFieldItem = ({ field, recipients }: ShowFieldItemProps) => {
<Card className={cn('bg-background h-full w-full')}>
<CardContent
className={cn(
- 'text-muted-foreground/50 flex h-full w-full flex-col items-center justify-center p-2',
+ 'text-muted-foreground/50 flex h-full w-full flex-col items-center justify-center p-2 text-xl',
+ field.type === FieldType.SIGNATURE && fontCaveat.className,
)}
>
{FRIENDLY_FIELD_TYPE[field.type]}