import { ComponentProps, ReactNode } from 'react'; import LinkWithStatus from './LinkWithStatus'; import clsx from 'clsx/lite'; export default function LinkWithIconLoader({ className, icon, loader, ...props }: Omit, 'children'> & { icon: ReactNode loader: ReactNode }) { return ( {({ isLoading }) => <> {icon} {isLoading && {loader} } } ); }