import React, { type PropsWithChildren, type RefObject } from 'react'; import { ButtonSizes, ButtonVariants, TextProps } from '..'; import type { BaseProps } from '../component-helpers'; /** * Design tokens */ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css'; import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css'; export declare const SubNavSubMenuVariants: readonly ["dropdown", "anchor"]; type SubMenuVariants = (typeof SubNavSubMenuVariants)[number]; type SubNavContextType = { portalRef: RefObject; }; export declare const useSubNavContext: () => SubNavContextType; export type SubNavProps = { /** * @deprecated The hasShadow prop is deprecated and will be removed in a future release. */ hasShadow?: boolean; /** * Allows the SubNav to be used at full width, * removing any internal padding and guttering. */ fullWidth?: boolean; 'data-testid'?: string; } & PropsWithChildren>; type HeadingBaseProps = { href: string; 'data-testid'?: string; } & PropsWithChildren> & BaseProps; type SubHeadingBaseProps = { href: string; 'data-testid'?: string; } & PropsWithChildren> & BaseProps; type LinkBaseProps = { href: string; 'data-testid'?: string; variant?: TextProps['variant']; _subMenuVariant?: SubMenuVariants; } & PropsWithChildren> & BaseProps; type SubMenuProps = { variant?: SubMenuVariants; } & React.HTMLAttributes & BaseProps; declare function SubMenuBase({ children, className, variant, ...props }: SubMenuProps): import("react/jsx-runtime").JSX.Element; type SubNavActionProps = { /** * Required path or location for the action button to link to. */ href: string; /** * Optional sizes for the button. */ size?: (typeof ButtonSizes)[number]; /** * Optional sizes for the button. */ variant?: (typeof ButtonVariants)[number]; } & Omit, 'href'>; declare function ActionBase({ children, href, variant, size, ...rest }: SubNavActionProps): import("react/jsx-runtime").JSX.Element; /** * Use SubNav to display a secondary navigation beneath a primary header. * @see https://primer.style/brand/components/SubNav */ export declare const SubNav: React.NamedExoticComponent & React.RefAttributes> & { Heading: ({ href, children, className, "data-testid": testID, ...props }: HeadingBaseProps) => import("react/jsx-runtime").JSX.Element; SubHeading: ({ href, children, className, "data-testid": testID, ...props }: SubHeadingBaseProps) => import("react/jsx-runtime").JSX.Element; Link: React.ForwardRefExoticComponent & React.RefAttributes>; Action: typeof ActionBase; SubMenu: typeof SubMenuBase; testIds: { root: string; readonly button: string; readonly overlay: string; readonly link: string; readonly heading: string; readonly action: string; readonly subMenu: string; }; }; export {};