Skip to content

Commit

Permalink
fix(dashboard): Make maily clickable everywhere (#7289)
Browse files Browse the repository at this point in the history
  • Loading branch information
desiprisg authored Dec 13, 2024
1 parent e7ace7c commit 06d2a6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { getComponentByType } from '@/components/workflow-editor/steps/component
import { EmailPreviewHeader } from '@/components/workflow-editor/steps/email/email-preview';
import { EmailTabsSection } from '@/components/workflow-editor/steps/email/email-tabs-section';
import { type UiSchema } from '@novu/shared';
import { motion } from 'motion/react';

const subjectKey = 'subject';
const emailEditorKey = 'emailEditor';
Expand All @@ -14,7 +13,7 @@ export const EmailEditor = (props: EmailEditorProps) => {
const { [emailEditorKey]: emailEditor, [subjectKey]: subject } = uiSchema?.properties ?? {};

return (
<>
<div className="flex h-full flex-col">
<EmailTabsSection>
<EmailPreviewHeader />
</EmailTabsSection>
Expand All @@ -23,11 +22,9 @@ export const EmailEditor = (props: EmailEditorProps) => {
</EmailTabsSection>
<Separator className="bg-neutral-100" />
{/* extra padding on the left to account for the drag handle */}
<EmailTabsSection className="pl-14">
<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }}>
{emailEditor && getComponentByType({ component: emailEditor.component })}
</motion.div>
<EmailTabsSection className="basis-full pl-14">
{emailEditor && getComponentByType({ component: emailEditor.component })}
</EmailTabsSection>
</>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ export const Maily = (props: MailyProps) => {
render={({ field }) => {
return (
<>
<div className={cn('mx-auto w-full', className)} {...rest}>
<div className={cn('mx-auto flex h-full w-full', className)} {...rest}>
<FormControl>
<Editor
config={{
hasMenuBar: false,
bodyClassName: '!bg-transparent !border-none !mt-0',
wrapClassName: 'h-full ',
bodyClassName: '!bg-transparent h-full !border-none !mt-0 [&>div]:h-full [&_.tiptap]:h-full',
}}
triggerSuggestionCharacter="{{"
variables={variables.map((v) => ({ name: v.label, required: false }))}
Expand Down

0 comments on commit 06d2a6c

Please sign in to comment.