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