Spaces:
Running
Running
File size: 1,286 Bytes
dd87944 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import React from "react";
import { Sparkles } from "lucide-react";
import { AspectRatio } from "./ui/aspect-ratio";
/** Shimmer placeholder while an image is being generated. */
export default function ImageGeneratingPlaceholder({ prompt, className = "" }) {
return (
<div
className={`w-full max-w-[340px] mx-auto ${className}`}
data-testid="image-gen-placeholder"
>
<div
className="rounded-xl overflow-hidden"
style={{ border: "1px solid var(--emo-border)" }}
>
<AspectRatio ratio={1}>
<div className="emo-image-gen-placeholder w-full h-full relative flex flex-col items-center justify-center gap-3 p-6">
<div className="emo-image-gen-sparkles" aria-hidden>
<Sparkles size={28} style={{ color: "var(--mode-color)" }} />
</div>
<p className="text-xs font-medium text-center" style={{ color: "var(--emo-text-secondary)" }}>
Création de l'image…
</p>
{prompt ? (
<p className="text-[10px] text-center line-clamp-2 max-w-[90%]" style={{ color: "var(--emo-text-muted)" }}>
{prompt}
</p>
) : null}
</div>
</AspectRatio>
</div>
</div>
);
}
|