From 6a9a7e13c7a480918963270c4b7c67e004466862 Mon Sep 17 00:00:00 2001 From: Max Holman Date: Wed, 11 Jan 2023 21:12:48 +0800 Subject: [PATCH] fix: add forwardref to icons --- lib/icons.tsx | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/lib/icons.tsx b/lib/icons.tsx index 230b209..168dd68 100644 --- a/lib/icons.tsx +++ b/lib/icons.tsx @@ -1,36 +1,36 @@ import { clsx } from 'clsx'; -import type { FC, SVGAttributes } from 'react'; +import { forwardRef, SVGAttributes } from 'react'; import { iconClassName } from './icons.css.js'; -export const InfoIcon: FC> = ({ - className, - ...props -}) => ( - - {' '} - - +export const InfoIcon = forwardRef>( + ({ className, ...props }, ref) => ( + + {' '} + + + ), ); -export const HelpIcon: FC> = ({ - className, - ...props -}) => ( - - - {' '} - +export const HelpIcon = forwardRef>( + ({ className, ...props }, ref) => ( + + + {' '} + + ), );