1 | import { __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | import styles from '@patternfly/react-styles/css/components/Breadcrumb/breadcrumb';
|
4 | import { css } from '@patternfly/react-styles';
|
5 | import { useOUIAProps } from '../../helpers';
|
6 | export const Breadcrumb = (_a) => {
|
7 | var { children = null, className = '', 'aria-label': ariaLabel = 'Breadcrumb', ouiaId, ouiaSafe = true } = _a, props = __rest(_a, ["children", "className", 'aria-label', "ouiaId", "ouiaSafe"]);
|
8 | const ouiaProps = useOUIAProps(Breadcrumb.displayName, ouiaId, ouiaSafe);
|
9 | return (React.createElement("nav", Object.assign({}, props, { "aria-label": ariaLabel, className: css(styles.breadcrumb, className) }, ouiaProps),
|
10 | React.createElement("ol", { className: styles.breadcrumbList }, React.Children.map(children, (child, index) => {
|
11 | const showDivider = index > 0;
|
12 | if (React.isValidElement(child)) {
|
13 | return React.cloneElement(child, { showDivider });
|
14 | }
|
15 | return child;
|
16 | }))));
|
17 | };
|
18 | Breadcrumb.displayName = 'Breadcrumb';
|
19 |
|
\ | No newline at end of file |