2024-05-04 12:32:19 +03:00

19 lines
455 B
TypeScript

import React from "react";
import { FieldInput, FieldLabel, FieldWrapper } from "./field.style";
export const InputField = ({ id, placeHolder, value, label }) => {
return (
<FieldWrapper>
<FieldLabel htmlFor={id}>
{label}
</FieldLabel>
<FieldInput id={id} type="text" placeholder={placeHolder} value={value} />
</FieldWrapper>
);
};
InputField.defaultProps = {
id: `input-${(Math.random() * 10).toString()}`,
};