From 92ce3a480cfd553d55836512b500554a780bf9f8 Mon Sep 17 00:00:00 2001 From: Wilbert Mui Date: Wed, 23 Aug 2023 23:25:56 -0700 Subject: [PATCH] feat: add buttonRef prop --- packages/button/src/Button.js | 8 +++++++- packages/button/src/presenters/ButtonPresenter.js | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/button/src/Button.js b/packages/button/src/Button.js index 50da43ce05..4f640dcb69 100644 --- a/packages/button/src/Button.js +++ b/packages/button/src/Button.js @@ -14,6 +14,7 @@ import ButtonPresenter from "./presenters/ButtonPresenter"; const Button = (props) => { const { + buttonRef, disabled, icon, link, @@ -54,6 +55,7 @@ const Button = (props) => { onMouseUp: handleMouseUp, }) => ( { const { + buttonRef, disabled, hasFocus, hasHover, @@ -61,6 +62,7 @@ const ButtonPresenter = (props) => { return ( { ButtonPresenter.displayName = "ButtonPresenter"; ButtonPresenter.propTypes = { + buttonRef: PropTypes.func, disabled: PropTypes.bool, hasFocus: PropTypes.bool, hasHover: PropTypes.bool,