@@ -2,7 +2,6 @@ import { GripVertical as HandleIcon, Plus, X } from "lucide-react";
22import { Reorder , useDragControls } from "motion/react" ;
33import { useCallback , useEffect , useState } from "react" ;
44
5- import { TemplateEditor as CodeMirrorEditor } from "@hypr/codemirror/template" ;
65import type { TemplateSection } from "@hypr/store" ;
76import { Button } from "@hypr/ui/components/ui/button" ;
87import { Input } from "@hypr/ui/components/ui/input" ;
@@ -213,25 +212,23 @@ function SectionItem({
213212 className = "border-0 bg-transparent p-0 font-medium shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 placeholder:text-muted-foreground/60"
214213 />
215214
216- < div
215+ < textarea
216+ disabled = { disabled }
217+ value = { item . description }
218+ onChange = { ( e ) => onChange ( { ...item , description : e . target . value } ) }
219+ placeholder = "Template content with Jinja2: {{ variable }}, {% if condition %}"
220+ onFocus = { ( ) => setIsFocused ( true ) }
221+ onBlur = { ( ) => setIsFocused ( false ) }
217222 className = { cn ( [
218- "min-h-[100px] border rounded-xl overflow-clip transition-colors" ,
223+ "min-h-[100px] w-full border rounded-xl p-3 resize-y transition-colors font-mono text-sm" ,
224+ "focus-visible:outline-none" ,
219225 disabled
220226 ? "bg-neutral-50"
221227 : isFocused
222228 ? "border-blue-500 ring-2 ring-primary/20"
223229 : "border-input" ,
224230 ] ) }
225- onFocus = { ( ) => setIsFocused ( true ) }
226- onBlur = { ( ) => setIsFocused ( false ) }
227- >
228- < CodeMirrorEditor
229- value = { item . description }
230- onChange = { ( value ) => onChange ( { ...item , description : value } ) }
231- placeholder = "Template content with Jinja2: {{ variable }}, {% if condition %}"
232- readOnly = { disabled }
233- />
234- </ div >
231+ />
235232 </ div >
236233 </ div >
237234 ) ;
0 commit comments