From b1f31901b666871e0f81de1dfd3c764f0a271836 Mon Sep 17 00:00:00 2001 From: Salief Date: Sun, 2 Jun 2024 18:40:24 -0400 Subject: [PATCH] add size prop to text based fallback comps for additional styling --- apps/site/components/server/ItemFallback.tsx | 61 ++++++++++++-------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/apps/site/components/server/ItemFallback.tsx b/apps/site/components/server/ItemFallback.tsx index 9307bec6..248a1a79 100644 --- a/apps/site/components/server/ItemFallback.tsx +++ b/apps/site/components/server/ItemFallback.tsx @@ -33,18 +33,18 @@ export function ItemFallback({ ) .with( P.when((type: string) => isMarkdown({ mimeType: type })), - () => , + () => , ) .with( P.when((type: string) => isGlb({ mimeType: type })), - () => , + () => , ) .with( P.when((type: string) => isPdf({ mimeType: type })), () => , ) .otherwise(() => ( - + ))} ) @@ -78,24 +78,29 @@ export function VideoFallback() { } export function FileFallback() { - return ( -
- - - - -
- ) - } + return ( +
+ + + + +
+ ) +} -export function TextFallback() { +export function TextFallback({ size }: { size?: 'xs' | 'sm' | 'md' | 'lg' }) { return ( -
+
+
+