Fix link component
This commit is contained in:
parent
627c64dca3
commit
aa6bbbaaa0
1 changed files with 4 additions and 1 deletions
|
@ -176,17 +176,19 @@ export const Micro = forwardRef(
|
|||
export const Link = forwardRef(
|
||||
(
|
||||
{
|
||||
as: Component = RouterLink,
|
||||
as,
|
||||
children,
|
||||
className,
|
||||
color = "link",
|
||||
href,
|
||||
to,
|
||||
fontWeight,
|
||||
overflowEllipsis,
|
||||
...rest
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
const Component = as || (to ? RouterLink : "a");
|
||||
let externalLinkProps;
|
||||
|
||||
if (href) {
|
||||
|
@ -200,6 +202,7 @@ export const Link = forwardRef(
|
|||
<Component
|
||||
{...externalLinkProps}
|
||||
{...rest}
|
||||
to={to}
|
||||
className={classNames(
|
||||
styles[color],
|
||||
styles[fontWeight],
|
||||
|
|
Loading…
Reference in a new issue