Files
srbhr--resume-matcher/apps/frontend/components/builder/forms/summary-form.tsx
T
wehub-resource-sync 5bdf4cc89a
Publish Docker Image / publish (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:39:36 +08:00

44 lines
1.2 KiB
TypeScript

'use client';
import React from 'react';
import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
import { useTranslations } from '@/lib/i18n';
interface SummaryFormProps {
value: string;
onChange: (value: string) => void;
}
export const SummaryForm: React.FC<SummaryFormProps> = ({ value, onChange }) => {
const { t } = useTranslations();
// Explicitly allow Enter key to create newlines
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (e.key === 'Enter') {
e.stopPropagation();
}
};
return (
<div className="space-y-4">
<div className="space-y-2">
<Label
htmlFor="summary"
className="font-mono text-xs uppercase tracking-wider text-steel-grey"
>
{t('resume.sections.summary')}
</Label>
<Textarea
id="summary"
value={value || ''}
onChange={(e) => onChange(e.target.value)}
onKeyDown={handleKeyDown}
placeholder={t('builder.placeholders.summary')}
className="min-h-[150px] text-black rounded-none border-black focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-blue-700 bg-white"
/>
</div>
</div>
);
};