We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1ec1f4 commit 76a0ef5Copy full SHA for 76a0ef5
frontend/src/utils/iconUtils.tsx
@@ -1,11 +1,12 @@
1
import React from 'react';
2
+import type { IconType } from 'react-icons';
3
4
/**
5
* Utility function to wrap react-icons components for React 19 compatibility
6
* This ensures that icon components return valid JSX elements instead of ReactNode
7
*/
8
export const renderIcon = (
- IconComponent: React.ComponentType<React.SVGProps<SVGSVGElement>>,
9
+ IconComponent: IconType,
10
props?: React.SVGProps<SVGSVGElement>
11
): React.JSX.Element => {
12
return React.createElement(IconComponent, props);
0 commit comments