Add onClick/href props to inner Component element

This commit is contained in:
nickfiacco-bolt 2020-12-04 16:35:28 -08:00
parent 3770ad7ea8
commit eac0315406

View File

@ -28,6 +28,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
children,
active,
onClick,
href,
width,
Component = 'button',
loading = false,
@ -52,6 +53,8 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
data-variant={variant}
ref={mergeRefs([ref, buttonRef])}
className={rootClassName}
onClick={onClick}
href={href}
disabled={disabled}
style={{
width,