import React from "react";

const TextField = ({options}) => {
  const defaultOptions = {
    name: '',
    value: '',
    description: '',
    placeholder: '',
    onChange: () => {},
  }
  let safeOptions = {}
  Object.assign(safeOptions, defaultOptions, options);

  return (
    <div className="wsiaca-field wsiaca-field--text">
      <input type="text" id={'dreamfox-field-'+safeOptions['name']} defaultValue={safeOptions['value']} onChange={safeOptions['onChange']} placeholder={safeOptions['placeholder']} />
    </div>
  );
}

export default TextField;