NoOptionsMessage.tsx 666 B

123456789101112131415161718192021222324
  1. import React from 'react';
  2. // Ignoring because I couldn't get @types/react-select work wih Torkel's fork
  3. // @ts-ignore
  4. import { components } from '@torkelo/react-select';
  5. // @ts-ignore
  6. import { OptionProps } from '@torkelo/react-select/lib/components/Option';
  7. export interface Props {
  8. children: Element;
  9. }
  10. export const NoOptionsMessage = (props: OptionProps<any>) => {
  11. const { children } = props;
  12. return (
  13. <components.Option {...props}>
  14. <div className="gf-form-select-box__desc-option">
  15. <div className="gf-form-select-box__desc-option__body">{children}</div>
  16. </div>
  17. </components.Option>
  18. );
  19. };
  20. export default NoOptionsMessage;