pmg-ui-kit 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FormField } from "../../types/formTypes";
|
|
1
|
+
import { type FormField as FormFieldType } from "../../types/formTypes";
|
|
2
2
|
type FormFieldProps = {
|
|
3
|
-
fieldSetup:
|
|
3
|
+
fieldSetup: FormFieldType;
|
|
4
4
|
value: string | File[] | number;
|
|
5
5
|
handleOnChange: (val: string | File[]) => void;
|
|
6
6
|
};
|
|
7
|
-
declare const FormField: ({ fieldSetup, value, handleOnChange, }: FormFieldProps) => React.ReactNode;
|
|
8
|
-
export
|
|
7
|
+
export declare const FormField: ({ fieldSetup, value, handleOnChange, }: FormFieldProps) => React.ReactNode;
|
|
8
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { Input } from "../atoms/Input";
|
|
|
3
3
|
import { InputTypeFileWithListing } from "../atoms/InputTypeFileWithListing";
|
|
4
4
|
import { Select } from "../atoms/Select";
|
|
5
5
|
import Textarea from "../atoms/Textarea";
|
|
6
|
-
const FormField = ({ fieldSetup, value, handleOnChange, }) => {
|
|
6
|
+
export const FormField = ({ fieldSetup, value, handleOnChange, }) => {
|
|
7
7
|
if (fieldSetup.fieldType === "text") {
|
|
8
8
|
return (_jsx(Input, { onClick: (e) => e.currentTarget.classList.remove("border-red-500", "!border-red-500"), onBlur: (e) => e.currentTarget.classList.remove("border-red-500", "!border-red-500"), className: fieldSetup.inputClassName, required: fieldSetup.required, name: fieldSetup.name, value: value, handleOnChange: handleOnChange, pattern: fieldSetup.pattern, placeholder: fieldSetup.placeholder, bottomHint: fieldSetup.bottomHint, wrapperClassNames: fieldSetup.wrapperClassNames }));
|
|
9
9
|
}
|
|
@@ -18,4 +18,3 @@ const FormField = ({ fieldSetup, value, handleOnChange, }) => {
|
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
};
|
|
21
|
-
export default FormField;
|