generate code

This commit is contained in:
hamid zarghami
2025-12-06 16:55:23 +03:30
parent 6447177b05
commit 7558dbb586
6 changed files with 56 additions and 37 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import { clx } from '../helpers/utils'
type Props = {
className?: string;
isloading?: boolean,
colorLoading?: string,
} & ButtonHTMLAttributes<HTMLButtonElement> &
XOR<{ children: ReactNode }, { label: string }>;
@@ -21,7 +22,7 @@ const Button: FC<Props> = memo((props: Props) => {
<button disabled={props.isloading} {...props} className={`${buttonClass} ${props.className}`} >
{
props.isloading ?
<MoonLoader color="white" size={16} />
<MoonLoader color={props.colorLoading || 'white'} size={16} />
:
props.label || props.children
}