import React from 'react' import {BorderBox} from '@primer/components' import NavList from './NavList' import {addPath} from './utils' /** * A
gets a `path` and optional children. If it has children it will * render those and prepend each child's `href` prop with the provided `path`. * This means that you can do: * * ```jsx *
* Links to /section/foo *
* ``` * * If no children are provided, it renders a with the provided * `path`. */ const Section = ({path, children}) => { return ( {children && path ? React.Children.map(children, child => addPath(child, path)) : } ) } export default Section