generate code
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user