Skip to content

Commit 6a35a9a

Browse files
fix: react types backwards compat for Tabs (#8651)
Co-authored-by: mukulsharma@adobe <[email protected]>
1 parent 88db698 commit 6a35a9a

File tree

1 file changed

+2
-2
lines changed
  • packages/@react-spectrum/tabs/src

1 file changed

+2
-2
lines changed

packages/@react-spectrum/tabs/src/Tabs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function TabLine(props: TabLineProps) {
261261
* A TabList is used within Tabs to group tabs that a user can switch between.
262262
* The keys of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.
263263
*/
264-
export function TabList<T>(props: SpectrumTabListProps<T>): ReactNode {
264+
export function TabList<T>(props: SpectrumTabListProps<T>): ReactElement {
265265
const tabContext = useContext(TabContext)!;
266266
const {refs, tabState, tabProps, tabPanelProps} = tabContext;
267267
const {isQuiet, density, isEmphasized, orientation} = tabProps;
@@ -337,7 +337,7 @@ export function TabList<T>(props: SpectrumTabListProps<T>): ReactNode {
337337
* TabPanels is used within Tabs as a container for the content of each tab.
338338
* The keys of the items within the <TabPanels> must match up with a corresponding item inside the <TabList>.
339339
*/
340-
export function TabPanels<T extends object>(props: SpectrumTabPanelsProps<T>): ReactNode {
340+
export function TabPanels<T extends object>(props: SpectrumTabPanelsProps<T>): ReactElement {
341341
const {tabState, tabProps} = useContext(TabContext)!;
342342
const {tabListState} = tabState;
343343

0 commit comments

Comments
 (0)