openreplay/frontend/app/components/Client/Integrations/FormField.tsx
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

33 lines
692 B
TypeScript

import React from 'react';
import { Input } from 'antd';
export function FormField({
label,
name,
value,
onChange,
autoFocus,
errors,
}: {
label: string;
name: string;
value: string;
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
autoFocus?: boolean;
errors?: string;
}) {
return (
<div className="mb-4">
<label className="block text-sm font-medium text-gray-700">{label}</label>
<Input
type="text"
name={name}
value={value}
onChange={onChange}
autoFocus={autoFocus}
/>
{errors && <div className="text-red-500 text-xs mt-1">{errors}</div>}
</div>
);
}
export default FormField;