Add href usage prop to Button

add href prop to Button component
This commit is contained in:
Faisal Kurdi 2020-12-01 17:05:37 -08:00 committed by GitHub
parent c0397d6174
commit 44de4695e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
loading = false,
disabled = false,
style = {},
href,
} = props
const ref = useRef<typeof Component>(null)
@ -48,6 +49,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
return (
<Component
href={href}
onClick={onClick}
aria-pressed={active}
data-variant={variant}