import { css } from '@emotion/react'; import { spacing } from '@expo/styleguide'; import { SidebarNodeProps } from './Sidebar'; import { SidebarGroup, SidebarCollapsible, SidebarLink } from './index'; export const SidebarSection = ({ route, ...rest }: SidebarNodeProps) => { // If the section or group is hidden, or has no content, we should not render it if (route.hidden || !route.children?.length) { return null; } return (
{route.children.map(child => child.type === 'page' ? ( {child.sidebarTitle || child.name} ) : ( ) )}
); }; const contentWrapperStyle = css({ marginBottom: spacing[4] + spacing[0.5], marginTop: spacing[1], });