Files
link-free/src/components/Link/index.tsx
T

17 lines
405 B
TypeScript
Raw Normal View History

2021-12-11 13:42:11 -03:00
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>
)
}