import * as React from 'react'; import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; import styles from '@patternfly/react-styles/css/components/Breadcrumb/breadcrumb'; import { css } from '@patternfly/react-styles'; export interface BreadcrumbHeadingProps extends React.HTMLProps { /** Content rendered inside the breadcrumb title. */ children?: React.ReactNode; /** Additional classes added to the breadcrumb item. */ className?: string; /** HREF for breadcrumb link. */ to?: string; /** Target for breadcrumb link. */ target?: string; /** Sets the base component to render. Defaults to */ component?: React.ReactNode; /** Internal prop set by Breadcrumb on all but the first crumb */ showDivider?: boolean; } export const BreadcrumbHeading: React.FunctionComponent = ({ children = null, className = '', to = undefined, target = undefined, component = 'a', showDivider, ...props }: BreadcrumbHeadingProps) => { const Component = component as any; return (
  • {showDivider && ( )}

    {!to && component === 'button' && ( )} {to && ( {children} )} {!to && component !== 'button' && {children}}

  • ); }; BreadcrumbHeading.displayName = 'BreadcrumbHeading';