🎥 Make videos programmatically with React
style(tp2mg): refine error display and alert destructive styling
ASchwad91fe8b7ee0a2
diff --git a/packages/template-prompt-to-motion-graphics/src/components/ErrorDisplay.tsx b/packages/template-prompt-to-motion-graphics/src/components/ErrorDisplay.tsxindex b2eb0d07e0..001a1820e1 100644--- a/packages/template-prompt-to-motion-graphics/src/components/ErrorDisplay.tsx+++ b/packages/template-prompt-to-motion-graphics/src/components/ErrorDisplay.tsx@@ -38,15 +38,21 @@ export const ErrorDisplay: React.FC<ErrorDisplayProps> = ({if (variant === "fullscreen") {return (- <div className="w-full aspect-video max-h-[calc(100%-80px)] flex justify-center items-center bg-background-error rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)] border border-destructive">- <Alert variant="destructive" className="max-w-[80%] bg-transparent border-none text-center">- <AlertCircle className={cn(styles.icon, "mx-auto")} />- {title && <AlertTitle className={styles.title}>{title}</AlertTitle>}- <AlertDescription className={cn(styles.description, "text-destructive-foreground font-mono whitespace-pre-wrap break-words")}>- {error}- </AlertDescription>+ <div className="w-full aspect-video max-h-[calc(100%-80px)] flex flex-col justify-center items-center bg-background-elevated rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)]">+ <div className="flex flex-col items-center gap-4 max-w-[80%] p-8">+ <div className="flex items-center justify-center w-12 h-12 rounded-full bg-destructive/10">+ <AlertCircle className="h-6 w-6 text-destructive" />+ </div>+ {title && (+ <h3 className="text-lg font-semibold text-foreground">{title}</h3>+ )}+ <div className="bg-background-error/50 border border-destructive/30 rounded-lg p-4 max-w-full overflow-auto">+ <pre className="text-sm text-destructive font-mono whitespace-pre-wrap break-words text-center">+ {error}+ </pre>+ </div>{children}- </Alert>+ </div></div>);}diff --git a/packages/template-prompt-to-motion-graphics/src/components/ui/alert.tsx b/packages/template-prompt-to-motion-graphics/src/components/ui/alert.tsxindex 14213546e5..0dfb59c616 100644--- a/packages/template-prompt-to-motion-graphics/src/components/ui/alert.tsx+++ b/packages/template-prompt-to-motion-graphics/src/components/ui/alert.tsx@@ -10,7 +10,7 @@ const alertVariants = cva(variant: {default: "bg-card text-card-foreground",destructive:- "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",+ "text-destructive bg-destructive/10 border-destructive/50 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",},},defaultVariants: {