className={`${className ? `${className} ` : ''}btn-${variant} ${iconClass} noselect`}
onMouseUp={(e) => blurOnBubbling(e, `.btn-${variant}`)}
onClick={onClick}
- type={type === 'button' ? 'button' : 'submit'}
+ // eslint-disable-next-line react/button-has-type
+ type={type}
disabled={disabled}
>
{iconSrc !== null && <RawIcon size="small" src={iconSrc} />}
className: PropTypes.string,
variant: PropTypes.oneOf(['surface', 'primary', 'positive', 'caution', 'danger']),
iconSrc: PropTypes.string,
- type: PropTypes.oneOf(['button', 'submit']),
+ type: PropTypes.oneOf(['button', 'submit', 'reset']),
onClick: PropTypes.func,
children: PropTypes.node.isRequired,
disabled: PropTypes.bool,
className={`ic-btn ic-btn-${variant}`}
onMouseUp={(e) => blurOnBubbling(e, `.ic-btn-${variant}`)}
onClick={onClick}
- type={type === 'button' ? 'button' : 'submit'}
+ // eslint-disable-next-line react/button-has-type
+ type={type}
>
<RawIcon size={size} src={src} />
</button>
IconButton.propTypes = {
variant: PropTypes.oneOf(['surface', 'positive', 'caution', 'danger']),
size: PropTypes.oneOf(['normal', 'small', 'extra-small']),
- type: PropTypes.oneOf(['button', 'submit']),
+ type: PropTypes.oneOf(['button', 'submit', 'reset']),
tooltip: PropTypes.string,
tooltipPlacement: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
src: PropTypes.string.isRequired,