jiti-meet/react/features/prejoin/components/country-picker/CountryDropdown.js

36 lines
721 B
JavaScript
Raw Normal View History

// @flow
import React from 'react';
2020-05-20 10:57:03 +00:00
import { countries } from '../../utils';
2020-05-20 10:57:03 +00:00
import CountryRow from './CountryRow';
type Props = {
/**
* Click handler for a single entry.
*/
onEntryClick: Function,
};
/**
* This component displays the dropdown for the country picker.
*
* @returns {ReactElement}
*/
function CountryDropdown({ onEntryClick }: Props) {
return (
<div className = 'cpick-dropdown'>
{countries.map(country => (
<CountryRow
country = { country }
key = { `${country.code}` }
onEntryClick = { onEntryClick } />
))}
</div>
);
}
export default CountryDropdown;