diff --git a/src/components/Tab.js b/src/components/Tab.js index f120b891a7..b9d023e01f 100644 --- a/src/components/Tab.js +++ b/src/components/Tab.js @@ -47,7 +47,10 @@ const Tab = (props) => { tabIndex, tabRef, ...attributes - } = props; + } = { + ...defaultProps, + ...props, + }; useEffect(() => { if (selected && focus) { @@ -78,8 +81,8 @@ const Tab = (props) => { ); }; -Tab.propTypes = propTypes; +Tab.propTypes = propTypes; Tab.tabsRole = 'Tab'; -Tab.defaultProps = defaultProps; + export default Tab; diff --git a/src/components/TabList.js b/src/components/TabList.js index 425bc83178..f4686434c2 100644 --- a/src/components/TabList.js +++ b/src/components/TabList.js @@ -14,7 +14,10 @@ const propTypes = { ]), }; const TabList = (props) => { - const { children, className, ...attributes } = props; + const { children, className, ...attributes } = { + ...defaultProps, + ...props, + }; return (