Function
isTabActive
({
props: { url, label },
}: ReactElement<TabProps<T>>)
Source from the content-addressed store, hash-verified
| 171 | }); |
| 172 | |
| 173 | const isTabActive = ({ |
| 174 | props: { url, label }, |
| 175 | }: ReactElement<TabProps<T>>) => { |
| 176 | if (controlledActive) { |
| 177 | return label === currentActive; |
| 178 | } |
| 179 | |
| 180 | if (url) { |
| 181 | return currentPath === url; |
| 182 | } |
| 183 | |
| 184 | return label === currentActive; |
| 185 | }; |
| 186 | |
| 187 | const renderSingleComponent = () => { |
| 188 | if (!shouldMountInactive) { |
Tested by
no test coverage detected