Skip to content

Commit c43333c

Browse files
authored
Merge pull request #420 from codegouvfr/fix/id-in-tabs
Fix - Handle id prop in Tabs component
2 parents b1c9d79 + 995ec32 commit c43333c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const Tabs = memo(
133133
};
134134

135135
const { getPanelId, getTabId } = (function useClosure() {
136-
const id = useId();
136+
const id = id_props ?? useId();
137137

138138
const getPanelId = (tabIndex: number) => `tabpanel-${id}-${tabIndex}-panel`;
139139
const getTabId = (tabIndex: number) => `tabpanel-${id}-${tabIndex}`;

0 commit comments

Comments
 (0)