1 | import * as React from 'react';
|
2 | import { css } from '@patternfly/react-styles';
|
3 | import styles from '@patternfly/react-styles/css/components/AppLauncher/app-launcher';
|
4 | import accessibleStyles from '@patternfly/react-styles/css/utilities/Accessibility/accessibility';
|
5 | import { ApplicationLauncherIcon } from './ApplicationLauncherIcon';
|
6 | import { ApplicationLauncherText } from './ApplicationLauncherText';
|
7 | import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
8 | import { ApplicationLauncherItemContext } from './ApplicationLauncherItemContext';
|
9 | export const ApplicationLauncherContent = ({ children }) => (React.createElement(ApplicationLauncherItemContext.Consumer, null, ({ isExternal, icon }) => (React.createElement(React.Fragment, null,
|
10 | icon && React.createElement(ApplicationLauncherIcon, null, icon),
|
11 | icon ? React.createElement(ApplicationLauncherText, null, children) : children,
|
12 | isExternal && (React.createElement(React.Fragment, null,
|
13 | React.createElement("span", { className: css(styles.appLauncherMenuItemExternalIcon) },
|
14 | React.createElement(ExternalLinkAltIcon, null)),
|
15 | React.createElement("span", { className: css(accessibleStyles.screenReader) }, "(opens new window)")))))));
|
16 | ApplicationLauncherContent.displayName = 'ApplicationLauncherContent';
|
17 |
|
\ | No newline at end of file |