Update Button.tsx

This commit is contained in:
Regaron 2020-12-01 07:58:00 +05:45 committed by GitHub
parent e367fd97ab
commit f525d246b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,12 +27,12 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
variant = 'flat',
children,
active,
onClick,
width,
Component = 'button',
loading = false,
disabled = false,
style = {},
...rest
} = props
const ref = useRef<typeof Component>(null)
@ -57,7 +57,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
width,
...style,
}}
onClick={onClick}
{...rest}
>
{children}
{loading && (