widgetCard.tsx 716 B

12345678910111213141516171819202122232425
  1. import {IconArrow, IconGlobe, IconGraph, IconMenu, IconNumber} from 'sentry/icons';
  2. import {IconGraphArea} from 'sentry/icons/iconGraphArea';
  3. import {IconGraphBar} from 'sentry/icons/iconGraphBar';
  4. import {DisplayType} from '../types';
  5. export function getWidgetIcon(displayType: DisplayType) {
  6. switch (displayType) {
  7. case DisplayType.TABLE:
  8. return IconMenu;
  9. case DisplayType.WORLD_MAP:
  10. return IconGlobe;
  11. case DisplayType.BIG_NUMBER:
  12. return IconNumber;
  13. case DisplayType.BAR:
  14. return IconGraphBar;
  15. case DisplayType.TOP_N:
  16. return IconArrow;
  17. case DisplayType.AREA:
  18. return IconGraphArea;
  19. case DisplayType.LINE:
  20. default:
  21. return IconGraph;
  22. }
  23. }