Fix LinkWithStatus children prop
This commit is contained in:
parent
dd26ed6442
commit
eceeec6aed
@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { ComponentProps, ReactNode, useState } from 'react';
|
import { ReactNode, useState } from 'react';
|
||||||
import Link from 'next/link';
|
import Link, { LinkProps } from 'next/link';
|
||||||
import LinkWithStatusChild from './primitives/LinkWithStatusChild';
|
import LinkWithStatusChild from './primitives/LinkWithStatusChild';
|
||||||
import clsx from 'clsx/lite';
|
import clsx from 'clsx/lite';
|
||||||
|
|
||||||
@ -12,8 +12,9 @@ export default function LinkWithStatus({
|
|||||||
isLoading: isLoadingProp = false,
|
isLoading: isLoadingProp = false,
|
||||||
setIsLoading: setIsLoadingProp,
|
setIsLoading: setIsLoadingProp,
|
||||||
...props
|
...props
|
||||||
}: ComponentProps<typeof Link> & {
|
}: LinkProps & {
|
||||||
children: ReactNode | ((props: { isLoading: boolean }) => ReactNode)
|
children: ReactNode | ((props: { isLoading: boolean }) => ReactNode)
|
||||||
|
className?: string
|
||||||
loadingClassName?: string
|
loadingClassName?: string
|
||||||
// For hoisting state to a parent component, e.g., <EntityLink />
|
// For hoisting state to a parent component, e.g., <EntityLink />
|
||||||
isLoading?: boolean
|
isLoading?: boolean
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user