widgetCard.tsx 649 B

1234567891011121314151617181920212223
  1. import {IconArrow, 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.BIG_NUMBER:
  10. return IconNumber;
  11. case DisplayType.BAR:
  12. return IconGraphBar;
  13. case DisplayType.TOP_N:
  14. return IconArrow;
  15. case DisplayType.AREA:
  16. return IconGraphArea;
  17. case DisplayType.LINE:
  18. default:
  19. return IconGraph;
  20. }
  21. }