import React from 'react';
import Select from '../../atoms/Select';
import countries from './countries.json';

const CountrySelect = (props) => (
  <Select {...props}>
    {Object.keys(countries).map((countryCode) => (
      <option
        value={countryCode}
        key={countryCode}
      >
        {countries[countryCode]}
      </option>
    ))}
  </Select>
);

export default CountrySelect;
