| 1 |
import { __rest } from "tslib"; |
| 2 |
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; |
| 3 |
import { Fragment } from 'react'; |
| 4 |
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon'; |
| 5 |
import styles from '@patternfly/react-styles/css/components/Breadcrumb/breadcrumb.mjs'; |
| 6 |
import { css } from '@patternfly/react-styles'; |
| 7 |
export const BreadcrumbHeading = (_a) => { |
| 8 |
var { children = null, className = '', to = undefined, target = undefined, component = 'a', showDivider } = _a, props = __rest(_a, ["children", "className", "to", "target", "component", "showDivider"]); |
| 9 |
const Component = component; |
| 10 |
return (_jsxs("li", Object.assign({}, props, { className: css(styles.breadcrumbItem, className), children: [showDivider && (_jsx("span", { className: styles.breadcrumbItemDivider, children: _jsx(RhMicronsCaretRightIcon, {}) })), _jsxs("h1", { className: styles.breadcrumbHeading, children: [!to && component === 'button' && (_jsx("button", { className: css(styles.breadcrumbLink, styles.modifiers.current), "aria-current": true, type: "button", children: children })), to && (_jsx(Component, { href: to, target: target, className: css(styles.breadcrumbLink, styles.modifiers.current), "aria-current": "page", children: children })), !to && component !== 'button' && _jsx(Fragment, { children: children })] })] }))); |
| 11 |
}; |
| 12 |
BreadcrumbHeading.displayName = 'BreadcrumbHeading'; |
| 13 |
//# sourceMappingURL=BreadcrumbHeading.js.map |