UNPKG

1.39 kBJavaScriptView Raw
1import * as React from 'react';
2import { css } from '@patternfly/react-styles';
3import styles from '@patternfly/react-styles/css/components/AppLauncher/app-launcher';
4import accessibleStyles from '@patternfly/react-styles/css/utilities/Accessibility/accessibility';
5import { ApplicationLauncherIcon } from './ApplicationLauncherIcon';
6import { ApplicationLauncherText } from './ApplicationLauncherText';
7import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
8import { ApplicationLauncherItemContext } from './ApplicationLauncherItemContext';
9export 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)")))))));
16ApplicationLauncherContent.displayName = 'ApplicationLauncherContent';
17//# sourceMappingURL=ApplicationLauncherContent.js.map
\No newline at end of file