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, 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,