From 4629d86289ffd41e8608b235fdee68ab0f4d5f64 Mon Sep 17 00:00:00 2001 From: rajun Date: Tue, 27 Oct 2026 16:28:53 +0530 Subject: [PATCH] feat: add AR page preview in a phone frame --- app/components/ui/ar-page-preview.tsx | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 app/components/ui/ar-page-preview.tsx diff --git a/app/components/ui/ar-page-preview.tsx b/app/components/ui/ar-page-preview.tsx new file mode 100644 index 0000000..2ba0ac0 --- /dev/null +++ b/app/components/ui/ar-page-preview.tsx @@ -0,0 +1,38 @@ +import type { ReactNode } from 'react'; +import { ArPage } from '~/components/ui/ar-page'; +import { PhoneFrame } from '~/components/ui/phone-frame'; +import { Text } from '~/components/ui/text'; +import { cn } from '~/lib/utils'; +import type { ArPageLayout, BrandIdentity, ButtonStyle } from '~/types/project'; + +const stripes = 'repeating-linear-gradient(135deg, var(--color-viewer-stripe) 0 9px, var(--color-viewer-stripe-alt) 9px 18px)'; + +interface ArPagePreviewProps { + brand?: BrandIdentity; + modelName: string; + button?: ButtonStyle; + layout?: ArPageLayout; + className?: string; + // The 3D viewer; a striped placeholder is shown when omitted + children?: ReactNode; +} + +export function ArPagePreview({ brand, modelName, button, layout, className, children }: ArPagePreviewProps) { + return ( + + + {children ?? ( + // Edge to edge when the model fills the page +
+ + 3D model + +
+ )} +
+
+ ); +}