diff --git a/components/tab/src/tab-bar/tabs.js b/components/tab/src/tab-bar/tabs.js index 56a148c91c..8b586bf8bb 100644 --- a/components/tab/src/tab-bar/tabs.js +++ b/components/tab/src/tab-bar/tabs.js @@ -52,11 +52,19 @@ const Tabs = ({ children, fixed, dataTest }) => { tabIndex={0} onKeyDown={handleKeyDown} > - {React.Children.map(children, (child, index) => - React.cloneElement(child, { - ref: childrenRefs[index], - }) - )} + {React.Children.map(children, (child, index) => { + if (React.isValidElement(child)) { + return React.cloneElement(child, { + ref: childrenRefs[index], + }) + } + // Wrap non-element children e.g string in a + return ( + + {child} + + ) + })}