mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-02-09 21:45:53 -05:00
* registerPlayer & successPlayer layout done * moved to chakra-ui@next * added meta components and icons * refactored code based on review comments * using React.ComponentProps for getting correct props * using jpeg for background images * removed unwanted `declare module` * changed font naming in design-system * fixed fontFamily in packge web * using Heading component for MetaHeading
34 lines
691 B
TypeScript
34 lines
691 B
TypeScript
import { Link } from '@metafam/ds';
|
|
import NextLink, { LinkProps } from 'next/link';
|
|
import React from 'react';
|
|
|
|
type Props = Omit<React.ComponentProps<typeof Link>, keyof LinkProps> & LinkProps;
|
|
|
|
export const MetaLink: React.FC<Props> = ({
|
|
children,
|
|
href,
|
|
as,
|
|
passHref,
|
|
prefetch,
|
|
replace,
|
|
scroll,
|
|
shallow,
|
|
...props
|
|
}) => (
|
|
<NextLink
|
|
href={href}
|
|
as={as}
|
|
passHref={passHref || true}
|
|
prefetch={prefetch}
|
|
replace={replace}
|
|
scroll={scroll}
|
|
shallow={shallow}
|
|
>
|
|
{/* NextLink passes the href */}
|
|
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
<Link color="cyan.400" {...props}>
|
|
{children}
|
|
</Link>
|
|
</NextLink>
|
|
);
|