openreplay/frontend/app/components/Client/Integrations/CloudwatchForm/RegionDropdown.js
Shekar Siri 2ed5cac986
Webpack upgrade and dependency cleanup (#523)
* change(ui) - webpack update
* change(ui) - api optimize and other fixes
2022-06-03 16:47:38 +02:00

20 lines
528 B
JavaScript

import React from 'react';
import { regionLabels as labels } from 'Types/integrations/cloudwatchConfig';
import Select from 'Shared/Select';
const options = Object.keys(labels).map(key => ({ text: labels[ key ], label: key }));
const RegionDropdown = props => (
<Select
{ ...props }
onChange={({ value }) => props.onChange({value})}
selection
value={ options.find(option => option.value === props.value) }
options={ options }
/>
);
RegionDropdown.displayName = "RegionDropdown";
export default RegionDropdown;