MCPcopy Index your code
hub / github.com/codeaashu/claude-code / Tab

Function Tab

src/components/design-system/Tabs.tsx:261–288  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

259 children: React.ReactNode;
260};
261export function Tab(t0) {
262 const $ = _c(4);
263 const {
264 title,
265 id,
266 children
267 } = t0;
268 const {
269 selectedTab,
270 width
271 } = useContext(TabsContext);
272 const insideModal = useIsInsideModal();
273 if (selectedTab !== (id ?? title)) {
274 return null;
275 }
276 const t1 = insideModal ? 0 : undefined;
277 let t2;
278 if ($[0] !== children || $[1] !== t1 || $[2] !== width) {
279 t2 = <Box width={width} flexShrink={t1}>{children}</Box>;
280 $[0] = children;
281 $[1] = t1;
282 $[2] = width;
283 $[3] = t2;
284 } else {
285 t2 = $[3];
286 }
287 return t2;
288}
289export function useTabsWidth() {
290 const {
291 width

Callers

nothing calls this directly

Calls 1

useIsInsideModalFunction · 0.85

Tested by

no test coverage detected