Skip to content

Commit ab03b8c

Browse files
committed
fix(Tabs): correct types
1 parent b9e6e36 commit ab03b8c

File tree

1 file changed

+2
-2
lines changed
  • packages/kit-headless/src/components/tabs

1 file changed

+2
-2
lines changed

packages/kit-headless/src/components/tabs/tabs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const Tabs: FunctionComponent<TabsProps> = (props) => {
133133
const tabId: string = tabIdFromTabMaybe || child.key || `${panelIndex}`;
134134

135135
if (label) {
136-
tabComponents.push(<Tab>{label}</Tab>);
136+
tabComponents.push((<Tab>{label}</Tab>) as JSXNode<typeof Tab>);
137137
}
138138
if (selected) {
139139
selectedIndex = panelIndex;
@@ -188,7 +188,7 @@ export const Tabs: FunctionComponent<TabsProps> = (props) => {
188188
tabListComponent.props.children = tabComponents;
189189
} else {
190190
// Creating it as <TabList /> and adding children later doesn't work
191-
tabListComponent = <TabList>{tabComponents}</TabList>;
191+
tabListComponent = (<TabList>{tabComponents}</TabList>) as JSXNode<typeof TabList>;
192192
}
193193

194194
if (typeof selectedIndex === 'number') {

0 commit comments

Comments
 (0)