MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / CodeGroupPanels

Function CodeGroupPanels

apps/baseai.dev/src/components/Code.tsx:232–251  ·  view source on GitHub ↗
({
	children,
	...props
}: React.ComponentPropsWithoutRef<typeof CodePanel>)

Source from the content-addressed store, hash-verified

230}
231
232function CodeGroupPanels({
233 children,
234 ...props
235}: React.ComponentPropsWithoutRef<typeof CodePanel>) {
236 let hasTabs = Children.count(children) > 1;
237
238 if (hasTabs) {
239 return (
240 <TabPanels>
241 {Children.map(children, child => (
242 <TabPanel>
243 <CodePanel {...props}>{child}</CodePanel>
244 </TabPanel>
245 ))}
246 </TabPanels>
247 );
248 }
249
250 return <CodePanel {...props}>{children}</CodePanel>;
251}
252
253function usePreventLayoutShift() {
254 let positionRef = useRef<HTMLElement>(null);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected