Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data-component="pf-nav-expandable"
className={css(styles.navLink)}
id={srText ? null : this.id}
href="#"
onClick={e => e.preventDefault()}
onMouseDown={e => e.preventDefault()}
aria-expanded={expandedState}
>
{title}
<span>
</span>
<section hidden="{expandedState" aria-labelledby="{this.id}">
{srText && (
<h2 id="{this.id}">
{srText}
</h2>
)}
<ul>{children}</ul>
</section>
)}
{({ isExternal, icon }) => (
<>
{icon && {icon}}
{icon ? {children} : children}
{isExternal && (
<>
<span>
</span>
<span>(opens new window)</span>
)}
)}