@dnanpm/styleguide
Version:
DNA Styleguide repository provides the set of components and theme object used in various DNA projects.
32 lines (31 loc) • 1.97 kB
TypeScript
import type { ComponentType, ReactNode } from 'react';
import React from 'react';
import type { MainHeaderNavigationProps } from '../MainHeaderNavigation';
interface MainNavTooltipMenuProps<ContentProps extends object = object> extends Pick<MainHeaderNavigationProps, 'onCartButtonClick'> {
/** Aria-label for screen readers in mobile */
ariaLabel?: string;
/** Tooltip menu content */
children?: ReactNode;
/** Overlap other elements */
zIndex?: number;
/** Tooltip position from right. Default: 1.25rem */
tooltipRight?: string;
/** Mandatory Component provided as login content */
contentComponent?: ComponentType<ContentProps> | ReactNode | boolean;
/** Array of tags (lowercase) that will close menu if they are inside the dropdown tooltip menu. default []. THIS CAN BE OVERRIDEN WITH data-no-close="true" in element */
closeWhenTagClicked?: string[];
/** Width of the opened menu content. default 20rem. */
contentWidth?: string;
/** This will define the global state object string. mandatory */
globalStateString: string;
/** Adjust menu margin so that it will not overflow if fullWidth. optional. default false. */
fullWidthDesktop?: boolean;
/** Adjust menu to be full width after this number. default xs (480). */
fullWidthBreakpoint?: number;
}
export declare const IconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
$isActive?: boolean;
$collapseSize: number;
}>> & string;
declare const MainNavTooltipMenu: <ContentProps extends object = object>({ ariaLabel, children, closeWhenTagClicked, contentComponent, contentWidth, fullWidthBreakpoint, fullWidthDesktop, globalStateString, tooltipRight, zIndex, ...props }: MainNavTooltipMenuProps<ContentProps>) => React.JSX.Element;
export default MainNavTooltipMenu;