mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-26 15:39:00 -05:00
feat: UI improvements to survey editor and summary cards (#6857)
This commit is contained in:
@@ -35,6 +35,7 @@ interface ConditionsEditorProps {
|
||||
callbacks: TConditionsEditorCallbacks;
|
||||
depth?: number;
|
||||
quotaErrors?: FieldErrors<TSurveyQuotaInput>;
|
||||
isSubmitted?: boolean;
|
||||
}
|
||||
|
||||
export function ConditionsEditor({
|
||||
@@ -43,6 +44,7 @@ export function ConditionsEditor({
|
||||
callbacks,
|
||||
depth = 0,
|
||||
quotaErrors,
|
||||
isSubmitted = false,
|
||||
}: Readonly<ConditionsEditorProps>) {
|
||||
const { t } = useTranslation();
|
||||
const [parent] = useAutoAnimate();
|
||||
@@ -256,7 +258,7 @@ export function ConditionsEditor({
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
{quotaError && <p className="text-error mt-2 w-full text-right text-sm">{quotaError}</p>}
|
||||
{quotaError && isSubmitted && <p className="text-error mt-2 w-full text-right text-sm">{quotaError}</p>}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
.fb-editor-heading-h1 {
|
||||
font-size: 25px !important;
|
||||
font-weight: 400 !important;
|
||||
margin-bottom: 20px !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,18 @@
|
||||
|
||||
interface EmptyStateProps {
|
||||
text: string;
|
||||
variant?: "default" | "simple";
|
||||
}
|
||||
|
||||
export const EmptyState = ({ text }: EmptyStateProps) => {
|
||||
export const EmptyState = ({ text, variant = "default" }: EmptyStateProps) => {
|
||||
if (variant === "simple") {
|
||||
return (
|
||||
<div className="shadow-xs rounded-xl border border-slate-100 bg-white p-4 text-center">
|
||||
<p className="text-sm text-slate-500">{text}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="shadow-xs rounded-xl border border-slate-100 bg-white p-4">
|
||||
<div className="w-full space-y-3">
|
||||
|
||||
Reference in New Issue
Block a user