Skip to content

Commit

Permalink
fix: just return children
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenSibon committed Dec 5, 2024
1 parent 9ddab75 commit c5d2e61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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(() => {
Expand Down

0 comments on commit c5d2e61

Please sign in to comment.