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