From e17c8dbd056848b44b1b7013885cafdd277e36c7 Mon Sep 17 00:00:00 2001 From: unix Date: Fri, 3 Apr 2020 14:40:53 +0800 Subject: [PATCH] fix(link): fix missing ref on forward component --- components/link/link.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/link/link.tsx b/components/link/link.tsx index 5adcbaf..2cfdf58 100644 --- a/components/link/link.tsx +++ b/components/link/link.tsx @@ -24,14 +24,14 @@ const defaultProps = { type NativeAttrs = Omit, keyof Props> export type LinkProps = Props & typeof defaultProps & NativeAttrs -const Link: React.FC> = React.memo(React.forwardRef(({ +const Link = React.memo(React.forwardRef>(({ href, color, underline, pure, children, className, block, ...props }, ref: React.Ref) => { const theme = useTheme() const linkColor = color || block ? theme.palette.success : 'inherit' const padding = block ? theme.layout.gapQuarter : '0' const decoration = underline ? 'underline' : 'none' - + return ( {children}