(props: BreadcrumbProps)
| 39 | export type BreadcrumbProps = AriaBreadcrumbItemProps; |
| 40 | |
| 41 | export function Breadcrumb(props: BreadcrumbProps) { |
| 42 | let ref = useRef<HTMLAnchorElement>(null); |
| 43 | /*- begin highlight -*/ |
| 44 | let {itemProps} = useBreadcrumbItem({...props, elementType: 'a'}, ref); |
| 45 | /*- end highlight -*/ |
| 46 | let {hoverProps, isHovered} = useHover(props); |
| 47 | let {focusProps, isFocusVisible} = useFocusRing(); |
| 48 | |
| 49 | return ( |
| 50 | <li className="react-aria-Breadcrumb"> |
| 51 | <a |
| 52 | {...mergeProps(itemProps, hoverProps, focusProps)} |
| 53 | ref={ref} |
| 54 | href={props.isCurrent ? undefined : props.href} |
| 55 | className="react-aria-Link" |
| 56 | data-hovered={isHovered || undefined} |
| 57 | data-focus-visible={isFocusVisible || undefined} |
| 58 | data-current={props.isCurrent || undefined} |
| 59 | data-disabled={props.isDisabled || undefined}> |
| 60 | {props.children} |
| 61 | </a> |
| 62 | {!props.isCurrent && <ChevronRight size={14} />} |
| 63 | </li> |
| 64 | ); |
| 65 | } |
nothing calls this directly
no test coverage detected