{"size": 722, "ext": "js", "max_stars_repo_path": "src/js/components/InputControl/InputControl.js", "max_stars_repo_name": "HaJunRyu/js-subway-admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/js/components/InputControl/InputControl.js", "max_issues_repo_name": "HaJunRyu/js-subway-admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/js/components/InputControl/InputControl.js", "max_forks_repo_name": "HaJunRyu/js-subway-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.7692307692, "max_line_length": 66, "alphanum_fraction": 0.7091412742}
const InputControl = ({ type, id, name, required, children }) => {
  const $inputControlContainer = document.createElement('div');
  $inputControlContainer.className = 'input-control';

  const $label = document.createElement('label');
  $label.htmlFor = id;
  $label.className = 'input-label';
  $label.hidden = true;
  $label.innerHTML = children;

  const $input = document.createElement('input');
  $input.type = type;
  $input.id = id;
  $input.name = name;
  $input.placeholder = children;
  $input.className = 'input-field';
  $input.required = required;

  $inputControlContainer.appendChild($label);
  $inputControlContainer.appendChild($input);

  return $inputControlContainer;
};

export default InputControl;
