mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-22 11:29:22 -05:00
fix: fixed overlay
This commit is contained in:
+19
-16
@@ -1,14 +1,15 @@
|
||||
export default function PreviewSurveyBgDeskstop({ children, survey, ContentRef }) {
|
||||
return survey.surveyBackground && survey.surveyBackground.bgType === "color" ? (
|
||||
<div className="flex flex-grow flex-col overflow-y-auto rounded-b-lg" ref={ContentRef}>
|
||||
<div
|
||||
className="relative flex w-full flex-grow flex-col items-center justify-center p-4 py-6"
|
||||
style={{
|
||||
backgroundColor: survey.surveyBackground.bg || "#ffff",
|
||||
filter: survey.surveyBackground?.brightness
|
||||
? `brightness(${survey.surveyBackground.brightness}%)`
|
||||
: "none",
|
||||
}}>
|
||||
<div className="relative flex w-full flex-grow flex-col items-center justify-center p-4 py-6">
|
||||
<div
|
||||
className="absolute inset-0 h-full w-full object-cover"
|
||||
style={{
|
||||
backgroundColor: survey.surveyBackground.bg,
|
||||
filter: survey.surveyBackground?.brightness
|
||||
? `brightness(${survey.surveyBackground.brightness}%)`
|
||||
: "none",
|
||||
}}></div>
|
||||
<div className="flex h-full w-full items-center justify-center">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,14 +38,16 @@ export default function PreviewSurveyBgDeskstop({ children, survey, ContentRef }
|
||||
</div>
|
||||
) : survey.surveyBackground && survey.surveyBackground.bgType === "image" ? (
|
||||
<div className="flex flex-grow flex-col overflow-y-auto rounded-b-lg" ref={ContentRef}>
|
||||
<div
|
||||
className="relative flex w-full flex-grow flex-col items-center justify-center p-4 py-6"
|
||||
style={{
|
||||
backgroundImage: `url(${survey.surveyBackground.bg})`,
|
||||
filter: survey.surveyBackground?.brightness
|
||||
? `brightness(${survey.surveyBackground.brightness}%)`
|
||||
: "none",
|
||||
}}>
|
||||
<div className="relative flex w-full flex-grow flex-col items-center justify-center p-4 py-6">
|
||||
<div
|
||||
className="absolute inset-0 h-full w-full object-cover"
|
||||
style={{
|
||||
backgroundImage: `url(${survey.surveyBackground.bg})`,
|
||||
backgroundSize: "cover",
|
||||
filter: survey.surveyBackground?.brightness
|
||||
? `brightness(${survey.surveyBackground.brightness}%)`
|
||||
: "none",
|
||||
}}></div>
|
||||
<div className="flex h-full w-full items-center justify-center">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user