diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 039160559f40..f0b6e9525ffe 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -5046,6 +5046,9 @@ Map { "type": "func", }, "renderAnchor": [Function], + "renderButton": Object { + "type": "func", + }, "renderContent": Object { "type": "func", }, diff --git a/packages/react/src/components/Tab/Tab.js b/packages/react/src/components/Tab/Tab.js index 4027eddb9b2f..b6d56ae7269f 100644 --- a/packages/react/src/components/Tab/Tab.js +++ b/packages/react/src/components/Tab/Tab.js @@ -73,6 +73,7 @@ export default class Tab extends React.Component { * side router libraries. **/ renderAnchor: deprecate(PropTypes.func), + renderButton: PropTypes.func, /* * An optional parameter to allow overriding the content rendering. @@ -119,7 +120,8 @@ export default class Tab extends React.Component { onClick, onKeyDown, // TODO: rename renderAnchor to renderButton in next major version - renderAnchor: renderButton, + renderAnchor, + renderButton, renderContent, // eslint-disable-line no-unused-vars ...other } = this.props; @@ -153,6 +155,8 @@ export default class Tab extends React.Component { }, }; + const renderElement = renderButton || renderAnchor; + return (