@fluentui/react-northstar
Version:
A themable React component library.
51 lines (50 loc) • 2.63 kB
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { ShorthandConfig } from '@fluentui/react-bindings';
import { UIComponentProps, ContentComponentProps, ChildrenComponentProps, ShorthandFactory } from '../../utils';
import { Accessibility, BreadcrumbBehaviorProps } from '@fluentui/accessibility';
import { BreadcrumbItem } from './BreadcrumbItem';
import { BreadcrumbDivider } from './BreadcrumbDivider';
import { BreadcrumbLink } from './BreadcrumbLink';
import { BreadcrumbSizeValues } from './breadcrumbContext';
export interface BreadcrumbProps extends UIComponentProps<BreadcrumbProps>, ContentComponentProps, ChildrenComponentProps {
/** Accessibility behavior if overridden by the user. */
accessibility?: Accessibility<BreadcrumbBehaviorProps>;
/** Breadcrumb can be sized */
size?: BreadcrumbSizeValues;
}
export declare type BreadcrumbStylesProps = Required<Pick<BreadcrumbProps, 'size'>>;
export declare const breadcrumbClassName = "ui-breadcrumb";
/**
* Breadcrumb is a component that indicates the path of the current page
*
* @accessibility
* Implements [ARIA Breadcrumb](https://www.w3.org/TR/wai-aria-practices-1.1/#breadcrumb) design pattern.
* Refers to [this ARIA discussion](https://github.com/w3c/aria-practices/issues/635), and uses arrow key to navigate between each breadcrumb item.
*
* @accessibilityIssues
* [Under NVDA Browse mode - Breadcrumb is not navigable](https://github.com/w3c/aria-practices/issues/635 )
*/
export declare const Breadcrumb: (<TExtendedElementType extends React.ElementType<any> = "nav">(props: Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof BreadcrumbProps> & {
as?: TExtendedElementType;
} & BreadcrumbProps) => JSX.Element) & {
propTypes?: React.WeakValidationMap<BreadcrumbProps> & {
as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
};
contextTypes?: PropTypes.ValidationMap<any>;
defaultProps?: Partial<BreadcrumbProps & {
as: "nav";
}>;
displayName?: string;
readonly __PRIVATE_PROPS?: Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "key" | keyof React.HTMLAttributes<HTMLElement>> & {
ref?: React.Ref<HTMLElement>;
}, "as" | keyof BreadcrumbProps> & {
as?: "nav";
} & BreadcrumbProps;
} & {
create: ShorthandFactory<BreadcrumbProps>;
shorthandConfig: ShorthandConfig<BreadcrumbProps>;
Item: typeof BreadcrumbItem;
Divider: typeof BreadcrumbDivider;
Link: typeof BreadcrumbLink;
};