File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,30 @@ export type LinkProps = DetailedHTMLProps<
2727
2828const Link : FunctionComponent < PropsWithChildren < LinkProps > > = ( {
2929 href,
30+ children,
3031 ...rest
3132} ) => {
3233 if ( isInternalLink ( href ) ) {
33- return < NextLink href = { href } { ...rest } /> ;
34+ return (
35+ < NextLink href = { href } { ...rest } >
36+ { children }
37+ </ NextLink >
38+ ) ;
3439 }
3540
3641 if ( isAnchorLink ( href ) ) {
37- return < a href = { href } { ...rest } /> ;
42+ return (
43+ < a href = { href } { ...rest } >
44+ { children }
45+ </ a >
46+ ) ;
3847 }
3948
40- return < a target = "_blank" rel = "noopener noreferrer" href = { href } { ...rest } /> ;
49+ return (
50+ < a target = "_blank" rel = "noopener noreferrer" href = { href } { ...rest } >
51+ { children }
52+ </ a >
53+ ) ;
4154} ;
4255
4356export default Link ;
You can’t perform that action at this time.
0 commit comments