diff --git a/src/components/Button/index.jsx b/src/components/Button/index.jsx index 6286881a..1fc86456 100644 --- a/src/components/Button/index.jsx +++ b/src/components/Button/index.jsx @@ -1,7 +1,7 @@ -import React from 'react'; +import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; -const Button = ({ +const Button = forwardRef(({ children, className, disabled, icon, negative, onClick, primary, type, ariaLabel, onKeyDown, }, ref) => ( -); +)); + +Button.displayName = 'Button'; Button.defaultProps = { className: '', @@ -42,4 +44,4 @@ Button.propTypes = { onKeyDown: PropTypes.func, }; -export default React.forwardRef(Button); +export default Button;