From 47a52dd0115c28765ebd952a0b9a7528b51de373 Mon Sep 17 00:00:00 2001 From: Thiago Soares Date: Mon, 16 Dec 2019 22:20:01 -0300 Subject: [PATCH] fix(button): add elementType to 'as' property type check (#4893) --- packages/react/src/components/Button/Button.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/Button/Button.js b/packages/react/src/components/Button/Button.js index eacf49325ccc..780406d9c889 100644 --- a/packages/react/src/components/Button/Button.js +++ b/packages/react/src/components/Button/Button.js @@ -112,7 +112,11 @@ Button.propTypes = { * Specify how the button itself should be rendered. * Make sure to apply all props to the root node and render children appropriately */ - as: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), + as: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.string, + PropTypes.elementType, + ]), /** * Specify an optional className to be added to your Button