mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-29 23:38:10 +01:00
Add scroll prop to links.
This commit is contained in:
parent
9af6e08c00
commit
435e6a155d
@ -116,7 +116,7 @@ export default function WebsiteMenuView({ websiteId, websiteDomain }) {
|
|||||||
return (
|
return (
|
||||||
<div className={styles.layout}>
|
<div className={styles.layout}>
|
||||||
<div className={styles.menu}>
|
<div className={styles.menu}>
|
||||||
<LinkButton href={pathname} className={styles.back} variant="quiet">
|
<LinkButton href={pathname} className={styles.back} variant="quiet" scroll={false}>
|
||||||
<Icon rotate={180}>
|
<Icon rotate={180}>
|
||||||
<Icons.ArrowRight />
|
<Icons.ArrowRight />
|
||||||
</Icon>
|
</Icon>
|
||||||
|
@ -3,7 +3,7 @@ import Link from 'next/link';
|
|||||||
import { useLocale } from 'components/hooks';
|
import { useLocale } from 'components/hooks';
|
||||||
import styles from './LinkButton.module.css';
|
import styles from './LinkButton.module.css';
|
||||||
|
|
||||||
export function LinkButton({ href, className, variant, children }) {
|
export function LinkButton({ href, className, variant, scroll = true, children }) {
|
||||||
const { dir } = useLocale();
|
const { dir } = useLocale();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -11,6 +11,7 @@ export function LinkButton({ href, className, variant, children }) {
|
|||||||
className={classNames(styles.button, className, { [styles[variant]]: true })}
|
className={classNames(styles.button, className, { [styles[variant]]: true })}
|
||||||
href={href}
|
href={href}
|
||||||
dir={dir}
|
dir={dir}
|
||||||
|
scroll={scroll}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Link>
|
</Link>
|
||||||
|
Loading…
Reference in New Issue
Block a user