mirror of
https://github.com/vercel/commerce.git
synced 2025-06-18 13:11:23 +00:00
Add onClick/href props to inner Component element
This commit is contained in:
parent
3770ad7ea8
commit
eac0315406
@ -28,6 +28,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
|||||||
children,
|
children,
|
||||||
active,
|
active,
|
||||||
onClick,
|
onClick,
|
||||||
|
href,
|
||||||
width,
|
width,
|
||||||
Component = 'button',
|
Component = 'button',
|
||||||
loading = false,
|
loading = false,
|
||||||
@ -52,6 +53,8 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
|||||||
data-variant={variant}
|
data-variant={variant}
|
||||||
ref={mergeRefs([ref, buttonRef])}
|
ref={mergeRefs([ref, buttonRef])}
|
||||||
className={rootClassName}
|
className={rootClassName}
|
||||||
|
onClick={onClick}
|
||||||
|
href={href}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
style={{
|
style={{
|
||||||
width,
|
width,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user