diff --git a/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.tsx b/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.tsx index 3e00f9835f4..b1c3fce9837 100644 --- a/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.tsx +++ b/apps/studio/components/interfaces/Auth/EmailTemplates/TemplateEditor.tsx @@ -6,6 +6,7 @@ import ReactMarkdown from 'react-markdown' import { toast } from 'sonner' import { useParams } from 'common' +import { useIsSecurityNotificationsEnabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext' import CodeEditor from 'components/ui/CodeEditor/CodeEditor' import TwoOptionToggle from 'components/ui/TwoOptionToggle' import { useAuthConfigQuery } from 'data/auth/auth-config-query' @@ -60,6 +61,8 @@ export const TemplateEditor = ({ template }: TemplateEditorProps) => { const { id, properties } = template + const isSecurityNotificationsEnabled = useIsSecurityNotificationsEnabled() + const messageSlug = `MAILER_TEMPLATES_${id}_CONTENT` as keyof typeof authConfig const messageProperty = properties[messageSlug] const builtInSMTP = @@ -251,8 +254,10 @@ export const TemplateEditor = ({ template }: TemplateEditorProps) => { name={x} render={({ field }) => ( { id={x} {...field} disabled={!canUpdateConfig} - className="w-full md:min-w-[300px] lg:min-w-[420px]" + className={`w-full ${isSecurityNotificationsEnabled && 'md:min-w-[300px] lg:min-w-[512px]'}`} />