Skip to content

Commit

Permalink
Hide background when preview not available
Browse files Browse the repository at this point in the history
  • Loading branch information
raimannma committed Feb 11, 2025
1 parent d2685ac commit f59de86
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions app/components/widget-builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,20 +345,22 @@ export default function WidgetBuilder({ region, accountId }: WidgetBuilderProps)

<div className="space-y-2">
<h3 className="text-sm font-medium text-gray-700">Preview</h3>
<div
className="p-4 rounded-lg flex items-center justify-center bg-cover"
style={
widgetPreviewBackgroundImage
? {
background: "url('deadlock-background.webp'), url('deadlock-background.png')",
backgroundSize: "cover",
backgroundRepeat: "no-repeat",
}
: { backgroundColor: widgetPreviewBackgroundColor }
}
>
{widgetPreview}
</div>
{widgetPreview && (
<div
className="p-4 rounded-lg flex items-center justify-center bg-cover"
style={
widgetPreviewBackgroundImage
? {
background: "url('deadlock-background.webp'), url('deadlock-background.png')",
backgroundSize: "cover",
backgroundRepeat: "no-repeat",
}
: { backgroundColor: widgetPreviewBackgroundColor }
}
>
{widgetPreview}
</div>
)}
</div>

<div className="space-y-2">
Expand Down

0 comments on commit f59de86

Please sign in to comment.