src/Tabs/Tabs.tsx
Showing 2 of 2 total issues
Function Tab
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
const Tab: FC<TabProps> = ({ test = 'tabs-tab', children, index, disabled, ...rest }) => { const { activeIndex, setActiveIndex, ...context } = useTabsContext() if (index === undefined) return null if (disabled === true && !context.disabledTabs.includes(activeIndex)) {
- Read upRead up
Function TabList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
const TabList: FC<TabListProps> = ({ children }) => { const { activeIndex, setActiveIndex, disabledTabs } = useTabsContext() const [focused, setFocused] = useState(false) const tabAmount = React.Children.count(children)
- Read upRead up