12345678910111213141516171819202122232425262728 |
- import React from 'react';
- import {IconGraphBar} from './iconGraphBar';
- import {IconGraphCircle} from './iconGraphCircle';
- import {IconGraphLine} from './iconGraphLine';
- import SvgIcon from './svgIcon';
- type Props = React.ComponentProps<typeof SvgIcon> & {
- type?: 'line' | 'circle' | 'bar';
- };
- const IconGraph = React.forwardRef(function IconGraph(
- {type = 'line', ...props}: Props,
- ref: React.Ref<SVGSVGElement>
- ) {
- switch (type) {
- case 'circle':
- return <IconGraphCircle {...props} ref={ref} />;
- case 'bar':
- return <IconGraphBar {...props} ref={ref} />;
- default:
- return <IconGraphLine {...props} ref={ref} />;
- }
- });
- IconGraph.displayName = 'IconGraph';
- export {IconGraph};
|