blob: f6b39d45ed779e94cf366997a88fb42fc784c89f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import NextLink from 'next/link'
/**
* The `Link` component is used to render Next.js links with customizable properties such as `children`, `scroll`, and `className`.
*
* @param {Object} props - Props passed to the `Link` component.
* @param {ReactNode} props.children - Child elements to be rendered as link content.
* @param {string} props.className - Additional CSS class to be applied to the link.
* @returns {JSX.Element} - Rendered `Link` component.
*/
const Link = ({ children, ...props }) => {
return (
<NextLink
{...props}
scroll={false}
className={`block font-medium text-danger-500 ${props?.className || ''}`}
>
{children}
</NextLink>
)
}
Link.defaultProps = NextLink.defaultProps
export default Link
|