/**
* External dependencies
*/
import { NavigationMenu, NavigationGroup } from '@woocommerce/experimental';
/**
* Internal dependencies
*/
import CategoryTitle from '../category-title';
import Item from '../../components/Item';
export const SecondaryMenu = ( { category, items, onBackClick } ) => {
if ( ! items.length ) {
return null;
}
const isRoot = category.id === 'woocommerce';
return (
}
menu={ category.id }
parentMenu={ category.parent }
backButtonLabel={ category.backButtonLabel || null }
onBackButtonClick={
isRoot ? null : () => onBackClick( category.id )
}
>
onBackClick( category.id ) }
>
{ items.map( ( item ) => (
) ) }
);
};