1 | import { __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | import { css } from '@patternfly/react-styles';
|
4 | import styles from '@patternfly/react-styles/css/components/JumpLinks/jump-links';
|
5 | import { JumpLinksList } from './JumpLinksList';
|
6 | export const JumpLinksItem = (_a) => {
|
7 | var { isActive, href,
|
8 |
|
9 | node, children, onClick, className } = _a, props = __rest(_a, ["isActive", "href", "node", "children", "onClick", "className"]);
|
10 | const childrenArr = React.Children.toArray(children);
|
11 | const sublists = childrenArr.filter(child => child.type === JumpLinksList);
|
12 | children = childrenArr.filter(child => child.type !== JumpLinksList);
|
13 | return (React.createElement("li", Object.assign({ className: css(styles.jumpLinksItem, isActive && styles.modifiers.current, className) }, (isActive && { 'aria-current': 'location' }), props),
|
14 | React.createElement("a", { className: styles.jumpLinksLink, href: href, onClick: onClick },
|
15 | React.createElement("span", { className: styles.jumpLinksLinkText }, children)),
|
16 | sublists));
|
17 | };
|
18 | JumpLinksItem.displayName = 'JumpLinksItem';
|
19 |
|
\ | No newline at end of file |