iconGraph.tsx 810 B

12345678910111213141516171819202122232425262728
  1. import {forwardRef} from 'react';
  2. import {IconGraphArea} from './iconGraphArea';
  3. import {IconGraphBar} from './iconGraphBar';
  4. import {IconGraphCircle} from './iconGraphCircle';
  5. import {IconGraphLine} from './iconGraphLine';
  6. import type {SVGIconProps} from './svgIcon';
  7. interface Props extends SVGIconProps {
  8. type?: 'line' | 'circle' | 'bar' | 'area';
  9. }
  10. const IconGraph = forwardRef<SVGSVGElement, Props>(({type = 'line', ...props}, ref) => {
  11. switch (type) {
  12. case 'circle':
  13. return <IconGraphCircle {...props} ref={ref} />;
  14. case 'bar':
  15. return <IconGraphBar {...props} ref={ref} />;
  16. case 'area':
  17. return <IconGraphArea {...props} ref={ref} />;
  18. default:
  19. return <IconGraphLine {...props} ref={ref} />;
  20. }
  21. });
  22. IconGraph.displayName = 'IconGraph';
  23. export {IconGraph};