From c5d2e6132ba449472862a4ee780c0e47822660b4 Mon Sep 17 00:00:00 2001 From: Ruben Sibon Date: Thu, 5 Dec 2024 15:10:09 +0100 Subject: [PATCH] fix: just return children --- packages/react/src/Tabs/Tabs.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Tabs/Tabs.tsx b/packages/react/src/Tabs/Tabs.tsx index 476c145231..2322cb3443 100644 --- a/packages/react/src/Tabs/Tabs.tsx +++ b/packages/react/src/Tabs/Tabs.tsx @@ -5,7 +5,7 @@ import clsx from 'clsx' import { forwardRef, useEffect, useId, useImperativeHandle, useMemo, useRef, useState } from 'react' -import type { ForwardedRef, HTMLAttributes, PropsWithChildren, ReactNode } from 'react' +import type { ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react' import { TabsButton } from './TabsButton' import { TabsContext } from './TabsContext' import { TabsList } from './TabsList' @@ -25,7 +25,7 @@ const TabsRoot = forwardRef( const allTabs = useMemo(() => { if (!Array.isArray(children)) return [] - return (children[0].props.children as ReactNode[]).map((child) => child) + return children[0].props.children }, [children]) useEffect(() => {