@atlaskit/side-navigation
Version:
A highly composable side navigation component that supports nested views.
52 lines (51 loc) • 1.98 kB
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import React from 'react';
import type { CustomItemComponentProps } from '@atlaskit/menu/types';
/**
* @deprecated `@atlaskit/side-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
export type HeaderProps = {
/**
* Element to render before the item text.
* Generally should be an [icon](https://atlassian.design/components/icon/icon-explorer) component.
*/
iconBefore?: React.ReactNode;
/**
* Event that is triggered when the element is clicked.
*/
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
/**
* Description of the item.
* This will render smaller text below the primary text of the item as well as slightly increasing the height of the item.
*/
description?: string | JSX.Element;
/**
* Primary content for the item.
*/
children?: React.ReactNode;
/**
* A `testId` prop is provided for specified elements,
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
* serving as a hook for automated tests.
*/
testId?: string;
/**
* Custom component to render as an item.
* This can be both a functional component or a class component.
* __Will return `null` if no component is defined.__
* __NOTE:__ Make sure the reference for this component does not change between renders else undefined behavior may happen.
*/
component?: React.ComponentType<CustomItemComponentProps>;
};
/**
* __Header__
*
* - [Examples](https://atlassian.design/components/side-navigation/examples#header-and-footer)
* - [Code](https://atlassian.design/components/side-navigation/code)
*
* @deprecated `@atlaskit/side-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
*/
export declare const Header: React.ForwardRefExoticComponent<React.PropsWithoutRef<HeaderProps> & React.RefAttributes<HTMLElement>>;