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()}`,
};
