main page changes
This commit is contained in:
1
components/telegramLink/index.tsx
Normal file
1
components/telegramLink/index.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export * from './telegramLink';
|
||||
14
components/telegramLink/telegramLink.module.scss
Normal file
14
components/telegramLink/telegramLink.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/telegramLink/telegramLink.tsx
Normal file
30
components/telegramLink/telegramLink.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import styles from './telegramLink.module.scss';
|
||||
import Link, { LinkProps } from 'next/link';
|
||||
import TelegramIcon from '@/assets/icons/telegram.svg';
|
||||
import clsx from 'clsx';
|
||||
import { CursorEffect } from '@/components/cursor';
|
||||
|
||||
type TelegramLinkProps = Omit<LinkProps, 'href'> & { className?: string };
|
||||
|
||||
export function TelegramLink(props: TelegramLinkProps) {
|
||||
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://t.me/ridebus"
|
||||
prefetch={false}
|
||||
>
|
||||
<TelegramIcon className={styles.linkIcon} />
|
||||
</Link>
|
||||
</CursorEffect>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user