import { PropsWithChildren, ReactNode } from 'react'; import { Loader2 } from 'lucide-react'; import { Icon } from '@@/Icon'; import { type Props as ButtonProps, Button } from './Button'; interface Props extends ButtonProps { loadingText: string; isLoading: boolean; } export function LoadingButton({ loadingText, isLoading, disabled, type = 'submit', children, icon, ...buttonProps }: PropsWithChildren) { return ( ); } function loadingButtonIcon(isLoading: boolean, defaultIcon: ReactNode) { if (!isLoading) { return defaultIcon; } return ( ); }