// @flow

import React from 'react';
import Select, { components } from 'react-select';
import { colourOptions } from '../data';

const IndicatorsContainer = props => {
  return (
    <div style={{ background: colourOptions[2].color }}>
      <components.IndicatorsContainer {...props} />
    </div>
  );
};

export default () => (
  <Select
    closeMenuOnSelect={false}
    components={{ IndicatorsContainer }}
    defaultValue={[colourOptions[4], colourOptions[5]]}
    isMulti
    options={colourOptions}
  />
);

import React from 'react';
import Select, { components, IndicatorContainerProps } from 'react-select';
import { ColourOption, colourOptions } from '../data';

const IndicatorsContainer = (
  props: IndicatorContainerProps<ColourOption, true>
) => {
  return (
    <div style={{ background: colourOptions[2].color }}>
      <components.IndicatorsContainer {...props} />
    </div>
  );
};

export default () => (
  <Select
    closeMenuOnSelect={false}
    components={{ IndicatorsContainer }}
    defaultValue={[colourOptions[4], colourOptions[5]]}
    isMulti
    options={colourOptions}
  />
);

Convert more examples to TypeScript
Convert more examples to TypeScript

