@dnanpm/styleguide
Version:
DNA Styleguide repository provides the set of components and theme object used in various DNA projects.
53 lines (52 loc) • 2.42 kB
TypeScript
import type { ComponentType, MouseEvent, ReactNode } from 'react';
import React from 'react';
import type { GlobalNavItems } from './types/globalNavProps';
export interface MainHeaderNavigationProps {
backToPreviousCategoryLabel?: string;
businessMenuAriaLabel?: string;
categoryCollectionText?: string;
/** Allows to pass a custom className */
className?: string;
featuredItemsAriaLabel?: string;
items?: GlobalNavItems;
language?: string;
zIndex?: number;
search?: boolean;
searchText?: string;
searchComponent?: ComponentType | ReactNode | boolean;
mainMenuAriaLabel?: string;
minicart?: boolean;
minicartText?: string;
minicartAmount?: number;
minicartAmountLabel?: string;
/**
* Defines MinicartComponent when used. If minicart is true but component is not provided, shown as disabled element.
*
* @deprecated Use `onCartButtonClick` property instead
*/
minicartComponent?: ComponentType | ReactNode | boolean;
showMinicart?: boolean;
/**
* On Cart button click callback
*/
onCartButtonClick?: (e: MouseEvent<HTMLElement>) => void;
dnaLogoLinkAriaLabel?: string;
openMainMenuAriaLabel?: string;
closeMainMenuAriaLabel?: string;
showLoginTooltip?: boolean;
languageSelector?: boolean;
languageSelectorText?: string;
login?: boolean;
loginText?: string;
loginComponent?: ComponentType | ReactNode | boolean;
isLoggedIn?: boolean;
collapseSize?: number;
nextJSLinkComponent: ComponentType | ReactNode | boolean;
nextJSLinkLegacyBehavior?: boolean;
currentUrl?: string;
notificationText?: string;
}
/** @visibleName MainHeaderNavigation */
declare const MainHeaderNavigation: ({ backToPreviousCategoryLabel, businessMenuAriaLabel, categoryCollectionText, closeMainMenuAriaLabel, className, collapseSize, currentUrl, dnaLogoLinkAriaLabel, featuredItemsAriaLabel, isLoggedIn, items, language, languageSelector, languageSelectorText, login, loginComponent, loginText, mainMenuAriaLabel, minicart, minicartAmount, minicartAmountLabel, minicartComponent, minicartText, nextJSLinkComponent, nextJSLinkLegacyBehavior, notificationText, openMainMenuAriaLabel, search, searchComponent, searchText, showLoginTooltip, showMinicart, zIndex, ...props }: MainHeaderNavigationProps) => React.JSX.Element;
/** @component */
export default MainHeaderNavigation;