Skip to content

Commit 3388426

Browse files
authored
fix: template-edit-page-responsiveness (#268)
1 parent 1216b80 commit 3388426

File tree

2 files changed

+7
-7
lines changed
  • apps/web/src/app/(dashboard)/templates/[templateId]/edit
  • packages/email-editor/src

2 files changed

+7
-7
lines changed

apps/web/src/app/(dashboard)/templates/[templateId]/edit/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function TemplateEditor({
119119
return (
120120
<div className="p-4 container mx-auto">
121121
<div className="mx-auto">
122-
<div className="mb-4 flex justify-between items-center w-[700px] mx-auto">
122+
<div className="mb-4 flex justify-between items-center w-full sm:w-[700px] mx-auto">
123123
<div className="flex items-center gap-3">
124124
<Link href="/templates">
125125
<ArrowLeft className="h-4 w-4" />
@@ -128,7 +128,7 @@ function TemplateEditor({
128128
type="text"
129129
value={name}
130130
onChange={(e) => setName(e.target.value)}
131-
className=" border-0 focus:ring-0 focus:outline-none px-0.5 w-[300px]"
131+
className=" border-0 focus:ring-0 focus:outline-none px-0.5 w-full sm:w-[300px]"
132132
onBlur={() => {
133133
if (name === template.name || !name) {
134134
return;
@@ -149,7 +149,7 @@ function TemplateEditor({
149149
/>
150150
</div>
151151

152-
<div className="flex items-center gap-4">
152+
<div className="flex items-center gap-4 whitespace-nowrap">
153153
<div className="flex items-center gap-2 text-sm text-gray-500">
154154
{isSaving ? (
155155
<div className="h-2 w-2 bg-yellow rounded-full" />
@@ -163,7 +163,7 @@ function TemplateEditor({
163163
</div>
164164
</div>
165165

166-
<div className="flex flex-col mt-4 mb-4 p-4 w-[700px] mx-auto z-50">
166+
<div className="flex flex-col mt-4 mb-4 p-4 w-full sm:w-[700px] mx-auto z-50">
167167
<div className="flex items-center gap-4">
168168
<label className="block text-sm w-[80px] text-muted-foreground">
169169
Subject
@@ -196,8 +196,8 @@ function TemplateEditor({
196196
</div>
197197
</div>
198198

199-
<div className=" rounded-lg bg-gray-50 w-[700px] mx-auto p-10">
200-
<div className="w-[600px] mx-auto">
199+
<div className=" rounded-lg bg-gray-50 w-full sm:w-[700px] mx-auto p-4 sm:p-10">
200+
<div className="w-full sm:w-[600px] mx-auto">
201201
<Editor
202202
initialContent={json}
203203
onUpdate={(content) => {

packages/email-editor/src/editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const Editor: React.FC<EditorProps> = ({
105105

106106
return (
107107
<div
108-
className="bg-white rounded-md text-black p-8 unsend-editor light"
108+
className="bg-white rounded-md text-black p-4 sm:p-8 unsend-editor light"
109109
ref={menuContainerRef}
110110
>
111111
<EditorContent editor={editor} className="min-h-[50vh]" />

0 commit comments

Comments
 (0)