* backend integrations ui start * some more ui things * moving around some integration code * add dynatrace * add datadog, useform hook and other things to update backend logging integration forms * change api queries * backend logging modals * tracker: fix some types * remove deprecated integrations, update types * some ui fixes and improvements * update notifications on success/error * ui: debugging log output, autoclose fix * ui: some stuff for logs base64str * ui: improve log formatting, change datadog data format * some improvs for logging irm * ui: fixup for sentry
33 lines
No EOL
689 B
TypeScript
33 lines
No EOL
689 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; |