Edit apps/web/app/(app)/environments/[environmentId]/settings/lookandfeel/components/UnifiedStyling.tsx

This commit is contained in:
review-agent-prime[bot]
2024-03-04 16:40:19 +00:00
committed by GitHub
parent 7a1af85141
commit bb61f31da0

View File

@@ -122,23 +122,23 @@ const previewSurvey = {
segment: null,
};
const StylingSettings = ({...props}) => {
// ... styling settings code ...
};
const SurveyPreview = ({...props}) => {
// ... survey preview code ...
};
const UnifiedStyling = ({ product }: UnifiedStylingProps) => {
const router = useRouter();
const [unifiedStyling, setUnifiedStyling] = useState(product.styling?.unifiedStyling ?? false);
const [allowStyleOverwrite, setAllowStyleOverwrite] = useState(
product.styling?.allowStyleOverwrite ?? false
// ...
return (
<div className="flex">
<StylingSettings {...props} />
<SurveyPreview {...props} />
</div>
);
const [brandColor, setBrandColor] = useState(
product.styling?.brandColor?.light ?? colorDefaults.brandColor
);
const [questionColor, setQuestionColor] = useState(
product.styling?.questionColor?.light ?? colorDefaults.questionColor
);
const [inputColor, setInputColor] = useState(
product.styling?.inputColor?.light ?? colorDefaults.inputColor
);
const [inputBorderColor, setInputBorderColor] = useState(
product.styling?.inputBorderColor?.light ?? colorDefaults.inputBorderColor
};
);
const [cardBackgroundColor, setCardBackgroundColor] = useState(
product.styling?.cardBackgroundColor?.light ?? colorDefaults.cardBackgroundColor