Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{(context: any) => (
<li>) => this.handleToggle(e, context.onToggle)}
{...props}
>
<a href="#" id="{srText" data-component="pf-nav-expandable"> e.preventDefault()}
onMouseDown={e => e.preventDefault()}
aria-expanded={expandedState}
>
{title}</a></li>
{(context: any) =>
React.cloneElement(child, {
onClick: (e: MouseEvent) => context.onSelect(e, groupId, itemId, to, preventDefault, onClick),
className: css(styles.navLink, isActive && styles.modifiers.current, child.props && child.props.className),
'aria-current': isActive ? 'page' : null
})
}
onClick: (
e: React.FormEvent,
itemId: number | string,
groupId: number | string,
to: string
) => void
) => this.onSelect(event, groupId, itemId, to, preventDefault, onClick),
onToggle: (event: React.MouseEvent, groupId: number | string, expanded: boolean) =>
this.onToggle(event, groupId, expanded),
updateScrollButtonState: this.updateScrollButtonState
}}
>
itemId: number | string,
groupId: number | string,
to: string
) => void
) => this.onSelect(event, groupId, itemId, to, preventDefault, onClick),
onToggle: (event: React.MouseEvent, groupId: number | string, expanded: boolean) =>
this.onToggle(event, groupId, expanded),
updateScrollButtonState: this.updateScrollButtonState
}}
>
<nav aria-label="{">
{children}</nav>
{(context: any) => (
<li>) => this.handleToggle(e, context.onToggle)}
{...props}
>
<a href="#" id="{srText" data-component="pf-nav-expandable"> e.preventDefault()}
onMouseDown={e => e.preventDefault()}
aria-expanded={expandedState}
>
{title}
<span></span></a></li>