Skip to content

Commit 646380b

Browse files
yaqi-lyuLewkans
andauthored
XS⚠️ ◾ Fix Custom Prompt Text Field Width (#224)
* fix width and break long urls * undo style changes * Update src/ui/src/components/settings/custom-prompt/PromptForm.tsx Co-authored-by: Lewis Toh [SSW] <88498002+Lewkans@users.noreply.github.com> * ensure break word --------- Co-authored-by: Lewis Toh [SSW] <88498002+Lewkans@users.noreply.github.com>
1 parent 4c5d9b6 commit 646380b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ui/src/components/settings/custom-prompt/PromptForm.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const PromptForm = forwardRef<PromptFormRef, PromptFormProps>(
7272

7373
return (
7474
<Form {...form}>
75-
<form className="flex flex-col gap-4 h-full">
75+
<form className="flex flex-col gap-4 h-full max-w-full">
7676
<FormField
7777
control={form.control}
7878
name="name"
@@ -121,9 +121,9 @@ export const PromptForm = forwardRef<PromptFormRef, PromptFormProps>(
121121
control={form.control}
122122
name="content"
123123
render={({ field }) => (
124-
<FormItem className="flex flex-col flex-1 min-h-0 overflow-hidden">
125-
<div className="flex items-center justify-between shrink-0">
126-
<FormLabel>Prompt Instructions</FormLabel>
124+
<FormItem className="flex flex-col flex-1 min-h-0 overflow-hidden shrink-0 max-w-full">
125+
<div className="flex items-center justify-between">
126+
<FormLabel className="text-white/90 text-sm">Prompt Instructions</FormLabel>
127127
<Button
128128
type="button"
129129
variant="ghost"
@@ -140,7 +140,7 @@ export const PromptForm = forwardRef<PromptFormRef, PromptFormProps>(
140140
{...field}
141141
placeholder="Enter your custom instructions here..."
142142
disabled={isDefault}
143-
className="resize-none flex-1 max-h-50 overflow-y-auto"
143+
className="resize-none flex-1 max-h-50 overflow-y-auto font-mono text-sm bg-black/40 border-white/20 max-w-full wrap-break-word break-normal whitespace-pre-wrap overflow-x-hidden [word-break:break-word]"
144144
/>
145145
</FormControl>
146146
<FormDescription>

0 commit comments

Comments
 (0)