mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 16:24:08 -06:00
fix: mobile preview on large screens (#6478)
This commit is contained in:
committed by
GitHub
parent
eeb337521b
commit
7c1110239b
@@ -134,7 +134,7 @@ describe("MediaBackground", () => {
|
||||
|
||||
render(<MediaBackground {...props} />);
|
||||
|
||||
const mobileContainer = document.querySelector(".w-\\[22rem\\]");
|
||||
const mobileContainer = document.querySelector("[data-testid='mobile-preview-container']");
|
||||
expect(mobileContainer).toBeInTheDocument();
|
||||
expect(screen.getByTestId("child-content")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -166,7 +166,8 @@ export const MediaBackground: React.FC<MediaBackgroundProps> = ({
|
||||
return (
|
||||
<div
|
||||
ref={ContentRef}
|
||||
className={`relative h-[90%] max-h-[42rem] w-[22rem] overflow-hidden rounded-[3rem] border-[6px] border-slate-400 ${getFilterStyle()}`}>
|
||||
data-testid="mobile-preview-container"
|
||||
className={`relative h-[90%] w-[45%] overflow-hidden rounded-[3rem] border-[6px] border-slate-400 ${getFilterStyle()}`}>
|
||||
{/* below element is use to create notch for the mobile device mockup */}
|
||||
<div className="absolute left-1/2 right-1/2 top-2 z-20 h-4 w-1/3 -translate-x-1/2 transform rounded-full bg-slate-400"></div>
|
||||
{surveyType === "link" && renderBackground()}
|
||||
|
||||
@@ -289,7 +289,7 @@ export const PreviewSurvey = ({
|
||||
<ClientLogo environmentId={environment.id} projectLogo={project.logo} previewSurvey />
|
||||
)}
|
||||
</div>
|
||||
<div className="z-10 w-full max-w-md rounded-lg border border-transparent">
|
||||
<div className="z-10 w-full rounded-lg border border-transparent">
|
||||
<SurveyInline
|
||||
isPreviewMode={true}
|
||||
survey={{ ...survey, type: "link" }}
|
||||
|
||||
Reference in New Issue
Block a user