Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/packages / features / Navigation / Menu / MenuInnerNavItem.js
Size: Mime:
import React from 'react';
import { handleMenuDropDownToggle } from '@skava/packages/features/Header/state';
import { analyticsContainer } from '@skava/packages/core/analytics';
import { StyledInnerMenuLink } from './styled';
// @todo - for customization
const toMenuLink = (identifier) => `/category/${identifier}`;
// this is for the nav items that render inside of a dropdown
export default class MenuInnerNavItem extends React.PureComponent {
    constructor() {
        super(...arguments);
        this.handleClick = () => {
            analyticsContainer.trackCustomEvent({
                action: 'sidePanelCategoryClick',
                category: 'Pancake',
                label: this.props.name,
            });
            handleMenuDropDownToggle();
        };
    }
    render() {
        const { identifier, name, isHeader, className } = this.props;
        const qa = isHeader ? 'qa-category' : 'qa-subcategory';
        return (React.createElement(StyledInnerMenuLink, { isTopLevel: isHeader, className: className, to: toMenuLink(identifier), text: name, "data-qa": qa, onClick: this.handleClick }));
    }
}
//# sourceMappingURL=MenuInnerNavItem.js.map