setIsExpanded(true)}
+ onMouseOut={() => setIsExpanded(false)}
+ >
+
+
+ {label}
+
+
+
+
+
+ )
+}
+
+const SubNavLink = (props: SubNavLinkProps) => {
+ const hasSubMenu = Children.toArray(props.children).some(child => {
if (isValidElement(child)) {
return child.type === _SubMenu
}
})
- const [label, SubMenuChildren] = children as ReactNode[]
+ if (hasSubMenu) {
+ return