diff --git a/.changeset/purple-suns-unite.md b/.changeset/purple-suns-unite.md new file mode 100644 index 0000000000..3eab535296 --- /dev/null +++ b/.changeset/purple-suns-unite.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/next-ui': patch +--- + +Exclude ‘disableBackNavigation’ prop from LinkOrButton in LayoutHeaderBack. diff --git a/packages/next-ui/Layout/components/LayoutHeaderBack.tsx b/packages/next-ui/Layout/components/LayoutHeaderBack.tsx index cf685d7c7f..fdfe8587ac 100644 --- a/packages/next-ui/Layout/components/LayoutHeaderBack.tsx +++ b/packages/next-ui/Layout/components/LayoutHeaderBack.tsx @@ -43,7 +43,7 @@ const buttonSx: SxProps = (theme) => ({ }) export function LayoutHeaderBack(props: BackProps) { - const { disableBackNavigation = false } = props + const { disableBackNavigation = false, ...rest } = props const router = useRouter() const path = router.asPath.split('?')[0] const up = useUp() @@ -68,7 +68,7 @@ export function LayoutHeaderBack(props: BackProps) { color='inherit' startIcon={backIcon} aria-label={label} - {...props} + {...rest} > {label} @@ -85,7 +85,7 @@ export function LayoutHeaderBack(props: BackProps) { startIcon={backIcon} aria-label={up.title} color='inherit' - {...props} + {...rest} > {up.title}