mirror of
https://github.com/dsoaress/link-free.git
synced 2026-11-29 21:34:44 +00:00
17 lines
405 B
TypeScript
17 lines
405 B
TypeScript
import NextLink from 'next/link'
|
|||
|
|
import { AnchorHTMLAttributes } from 'react'
|
||
|
|
|
||
|
|
import { LinkVariantProps, Wrapper } from './styles'
|
||
|
|
|
||
|
|
export type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
||
|
|
href: string
|
||
|
|
color?: LinkVariantProps['color']
|
||
|
|
}
|
||
|
|
|
||
|
|
export function Link({ href, ...rest }: LinkProps) {
|
||
|
|
return (
|
||
|
|
<NextLink href={href} passHref>
|
||
|
|
<Wrapper {...rest} />
|
||
|
|
</NextLink>
|
||
|
|
)
|
||
|
|
}
|