fix: project styling settings issues (#6488)

This commit is contained in:
Dhruwang Jariwala
2025-09-09 14:03:28 +05:30
committed by GitHub
parent 764b8ec260
commit fdba260301
6 changed files with 6 additions and 8 deletions

View File

@@ -34,10 +34,6 @@ export const defaultStyling: TProjectStyling = {
isLogoHidden: false,
highlightBorderColor: undefined,
isDarkModeEnabled: false,
background: {
bg: "#fff",
bgType: "color",
},
roundness: 8,
cardArrangement: {
linkSurveys: "straight",

View File

@@ -29,7 +29,7 @@ import { useCallback, useState } from "react";
import { SubmitHandler, UseFormReturn, useForm } from "react-hook-form";
import toast from "react-hot-toast";
import { TProjectStyling, ZProjectStyling } from "@formbricks/types/project";
import { TSurvey, TSurveyStyling, TSurveyType } from "@formbricks/types/surveys/types";
import { TSurveyStyling, TSurveyType } from "@formbricks/types/surveys/types";
interface ThemeStylingProps {
project: Project;
@@ -190,7 +190,7 @@ export const ThemeStyling = ({
<div className="relative w-1/2 rounded-lg bg-slate-100 pt-4">
<div className="sticky top-4 mb-4 h-[600px]">
<ThemeStylingPreviewSurvey
survey={previewSurvey(project.name, t) as TSurvey}
survey={previewSurvey(project.name, t)}
project={{
...project,
styling: form.watch(),

View File

@@ -76,6 +76,7 @@ export const AnimatedSurveyBg = ({ handleBgChange, background }: AnimatedSurveyB
const value = animationFiles[key];
return (
<button
type="button"
key={key}
onMouseEnter={() => debouncedManagePlayback(index, "play")}
onMouseLeave={() => debouncedManagePlayback(index, "pause")}

View File

@@ -23,6 +23,7 @@ export const ColorSurveyBg = ({ handleBgChange, colors, background }: ColorSurve
{colors.map((x) => {
return (
<button
type="button"
className={`h-16 w-16 cursor-pointer rounded-lg border border-slate-300 ${
color === x ? "border-4 border-slate-500" : ""
}`}

View File

@@ -67,7 +67,7 @@ export const MediaBackground: React.FC<MediaBackgroundProps> = ({
}
}, [backgroundLoaded, onBackgroundLoaded]);
const baseClasses = "absolute inset-0 h-full w-full transition-opacity duration-500";
const baseClasses = "absolute inset-0 h-full w-full transition-opacity duration-500 bg-slate-200";
const loadedClass = backgroundLoaded ? "opacity-100" : "opacity-0";
const getFilterStyle = () => {

View File

@@ -243,7 +243,7 @@ export const PreviewSurvey = ({
: "expanded_with_fixed_positioning"
: "shrink"
}
className="relative flex h-full w-[95%] items-center justify-center rounded-lg border border-slate-300 bg-slate-200">
className="relative flex h-full w-[95%] items-center justify-center rounded-lg border border-slate-300">
{previewMode === "mobile" && (
<>
<p className="absolute left-0 top-0 m-2 rounded bg-slate-100 px-2 py-1 text-xs text-slate-400">