import React from 'react';
import './DropDown.css';

export default props => {
  const options = props.items.map((s, i) => {
    return (
      <option className={'DropDownOption'} key={i} value={s}>{s}</option>
    );
  });

  return (
    <div className={'DropDown'}>
      <select className={'DropDownSelect' + (props.auto ? ' Auto ' : '') + (props.alt ? ' Alt ' : '') }
              autoFocus={props.autoFocus}
              disabled={props.disabled}
              onChange={props.changed}
              value={props.selected}>
        {options}
      </select>
    </div>
  );

};
