@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
43 lines (42 loc) • 1.52 kB
TypeScript
import React from 'react';
import type { ButtonProps } from '../Button';
import type { AnchorAllProps } from '../Anchor';
import type { DataAttributes } from '../../shared/types';
import type { IconIcon } from '../icon/Icon';
import type { SkeletonShow } from '../skeleton/Skeleton';
export type BreadcrumbItemProps = {
/**
* Text displaying the title of the item's corresponding page
* Defaults to `Home` when variant is `home`, otherwise required.
*/
text?: React.ReactNode;
/**
* Icon displaying on the left side
* Default: `HomeIcon / chevron_right`
*/
icon?: IconIcon;
/**
* Href should be the link to the item's corresponding page.
* Default: `null`
*/
href?: string;
/**
* Set a custom click event. In this case, you should not define the prop href.
* Default: `null`
*/
onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;
/**
* The component variant. Variant 'current' should correspond to the current page and 'home' to the root page.
* Default: `null`
*/
variant?: 'home' | 'previous' | 'current';
/**
* Skeleton should be applied when loading content
* Default: `null`
*/
skeleton?: SkeletonShow;
/** Internal */
itemNo?: number;
} & (AnchorAllProps & Omit<ButtonProps, 'variant'>) & DataAttributes;
declare const BreadcrumbItem: (localProps: BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
export default BreadcrumbItem;