CoastalCommitsPastes/client/app/components/link/index.tsx

19 lines
430 B
TypeScript
Raw Normal View History

import NextLink from "next/link"
import styles from "./link.module.css"
type LinkProps = {
2022-11-10 02:11:36 -05:00
colored?: boolean
children: React.ReactNode
} & React.ComponentProps<typeof NextLink>
2022-11-09 21:38:05 -05:00
const Link = ({ colored, children, ...props }: LinkProps) => {
const className = colored ? `${styles.link} ${styles.color}` : styles.link
return (
2022-11-09 21:38:05 -05:00
<NextLink {...props} className={className}>
{children}
</NextLink>
)
}
export default Link