Skip to content

Commit

Permalink
Merge pull request #446 from nextui-org/fix/link-children
Browse files Browse the repository at this point in the history
fix(react-link): wrap it into a single child
  • Loading branch information
jrgarciadev committed May 2, 2022
2 parents a4049d8 + c5d96b2 commit 9c90e13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react/src/link/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ export type LinkProps = Props &
const Link = React.forwardRef<React.ElementRef<typeof StyledLink>, LinkProps>(
({ children, icon, ...props }, forwardedRef) => (
<StyledLink {...props} ref={forwardedRef}>
{children}
{icon && <LinkIcon />}
<>
{children}
{icon && <LinkIcon />}
</>
</StyledLink>
)
);
Expand Down

0 comments on commit 9c90e13

Please sign in to comment.