Pure helper: convert a tab index into the new value the discriminated union should emit. Returns undefined when the index is out of bounds.
undefined
Extracted from DiscriminatedUnionTabs so the contract is unit-testable without rendering the tabs component (which relies on React hooks).
DiscriminatedUnionTabs
Pure helper: convert a tab index into the new value the discriminated union should emit. Returns
undefinedwhen the index is out of bounds.Extracted from
DiscriminatedUnionTabsso the contract is unit-testable without rendering the tabs component (which relies on React hooks).