MCPcopy Index your code
hub / github.com/primer/react / getValidChildren

Function getValidChildren

packages/react/src/UnderlineNav/UnderlineNav.tsx:126–128  ·  view source on GitHub ↗
(children: React.ReactNode)

Source from the content-addressed store, hash-verified

124}
125
126export const getValidChildren = (children: React.ReactNode) => {
127 return React.Children.toArray(children).filter(child => React.isValidElement(child)) as React.ReactElement[]
128}
129
130const calculatePossibleItems = (childWidthArray: ChildWidthArray, navWidth: number, moreMenuWidth = 0) => {
131 const widthToFit = navWidth - moreMenuWidth

Callers 1

UnderlineNav.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected