mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 19:58:11 +00:00
chore: fmt
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { InputHTMLAttributes, ReactNode, forwardRef } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import { InputHTMLAttributes, ReactNode, forwardRef } from "react";
|
||||
import clsx from "clsx";
|
||||
|
||||
export interface FormFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
||||
label: string;
|
||||
@@ -18,21 +18,23 @@ const FormField = forwardRef<HTMLInputElement, FormFieldProps>(
|
||||
id={fieldId}
|
||||
aria-invalid={Boolean(error)}
|
||||
className={clsx(
|
||||
'rounded-md border px-3 py-2 text-gray-900 outline-none transition focus:ring-2',
|
||||
"rounded-md border px-3 py-2 text-gray-900 outline-none transition focus:ring-2",
|
||||
error
|
||||
? 'border-red-400 focus:border-red-500 focus:ring-red-100'
|
||||
: 'border-gray-300 focus:border-blue-500 focus:ring-blue-100',
|
||||
? "border-red-400 focus:border-red-500 focus:ring-red-100"
|
||||
: "border-gray-300 focus:border-blue-500 focus:ring-blue-100",
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
/>
|
||||
{hint && !error ? <span className="text-xs text-gray-500">{hint}</span> : null}
|
||||
{hint && !error ? (
|
||||
<span className="text-xs text-gray-500">{hint}</span>
|
||||
) : null}
|
||||
{error ? <span className="text-xs text-red-600">{error}</span> : null}
|
||||
</label>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
FormField.displayName = 'FormField';
|
||||
FormField.displayName = "FormField";
|
||||
|
||||
export default FormField;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { default as FormField } from './FormField';
|
||||
export type { FormFieldProps } from './FormField';
|
||||
export { default as FormField } from "./FormField";
|
||||
export type { FormFieldProps } from "./FormField";
|
||||
|
||||
Reference in New Issue
Block a user