first commit
This commit is contained in:
14
components/githubLink/githubLink.module.scss
Normal file
14
components/githubLink/githubLink.module.scss
Normal file
@@ -0,0 +1,14 @@
|
||||
.linkWrapper {
|
||||
display: inline-flex;
|
||||
height: min-content;
|
||||
}
|
||||
|
||||
.link {
|
||||
display: inline-flex;
|
||||
padding: 18px;
|
||||
cursor: none;
|
||||
}
|
||||
|
||||
.linkIcon {
|
||||
color: var(--on-background);
|
||||
}
|
||||
30
components/githubLink/githubLink.tsx
Normal file
30
components/githubLink/githubLink.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import styles from './githubLink.module.scss';
|
||||
import Link, { LinkProps } from 'next/link';
|
||||
import GithubIcon from '@/assets/icons/github.svg';
|
||||
import clsx from 'clsx';
|
||||
import { CursorEffect } from '@/components/cursor';
|
||||
|
||||
type GithubLinkProps = Omit<LinkProps, 'href'> & { className?: string };
|
||||
|
||||
export function GithubLink(props: GithubLinkProps) {
|
||||
const { className: restClassName, ...restProps } = props;
|
||||
|
||||
return (
|
||||
<CursorEffect
|
||||
effectDistance={48}
|
||||
effectForce={4}
|
||||
cursorPadding={0}
|
||||
className={clsx(styles.linkWrapper)}
|
||||
>
|
||||
<Link
|
||||
{...restProps}
|
||||
className={clsx(styles.link, restClassName)}
|
||||
target="_blank"
|
||||
href="https://github.com/ztimms73/ridebus"
|
||||
prefetch={false}
|
||||
>
|
||||
<GithubIcon className={styles.linkIcon} />
|
||||
</Link>
|
||||
</CursorEffect>
|
||||
);
|
||||
}
|
||||
1
components/githubLink/index.tsx
Normal file
1
components/githubLink/index.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export * from './githubLink';
|
||||
Reference in New Issue
Block a user