({
children,
...props
}: React.ComponentPropsWithoutRef<typeof CodePanel>)
| 230 | } |
| 231 | |
| 232 | function 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 | |
| 253 | function usePreventLayoutShift() { |
| 254 | let positionRef = useRef<HTMLElement>(null); |
nothing calls this directly
no outgoing calls
no test coverage detected