@cerberus-design/react
Version:
The Cerberus Design React component library.
58 lines (57 loc) • 1.57 kB
text/typescript
import { HTMLAttributes } from 'react';
import { Positions } from '../../types';
/**
* This module contains the NavMenuList component.
* @module
*/
interface GetPositionResult {
/**
* The left position of the element.
*/
left: string;
/**
* The right position of the element.
*/
right: string;
/**
* The top position of the element.
*/
top: string;
/**
* The bottom position of the element.
*/
bottom: string;
}
/**
* @deprecated use the {@link Menu} family instead
*/
export declare function getPosition(position: Positions): GetPositionResult;
export interface NavMenuListProps extends HTMLAttributes<HTMLUListElement> {
/**
* The unique identifier for the NavMenuList. Required for accessibility.
*/
id: string;
/**
* The position of the NavMenuList.
* @type 'top' | 'right' | 'bottom' | 'left'
* @default 'bottom'
*/
position?: Positions;
}
/**
* A component that allows the user to display a menu of navigation links.
* @definition [Disclosure Nav](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/)
* @see https://cerberus.digitalu.design/react/nav-menu
*
* @example
* ```tsx
* <NavMenu>
* <NavMenuList id="nav-menu-list" position="bottom">
* <NavMenuLink href="/home">Home</NavMenuLink>
* <NavMenuLink href="/about">About</NavMenuLink>
* </NavMenuList>
* </NavMenu>
* ```
**/
export declare function NavMenuList(props: NavMenuListProps): import("react/jsx-runtime").JSX.Element;
export {};