mirror of
https://github.com/vercel/commerce.git
synced 2025-06-18 13:11:23 +00:00
Add href usage prop to Button
add href prop to Button component
This commit is contained in:
parent
c0397d6174
commit
44de4695e7
@ -33,6 +33,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
|||||||
loading = false,
|
loading = false,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
style = {},
|
style = {},
|
||||||
|
href,
|
||||||
} = props
|
} = props
|
||||||
const ref = useRef<typeof Component>(null)
|
const ref = useRef<typeof Component>(null)
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Component
|
<Component
|
||||||
|
href={href}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
aria-pressed={active}
|
aria-pressed={active}
|
||||||
data-variant={variant}
|
data-variant={variant}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user