webpack/components/NewTemplateSync/components/ButtonTooltip.js in foreman_templates-9.2.0 vs webpack/components/NewTemplateSync/components/ButtonTooltip.js in foreman_templates-9.3.0
- old
+ new
@@ -1,21 +1,15 @@
import React from 'react';
-import { Tooltip, Icon, OverlayTrigger } from 'patternfly-react';
+import { Tooltip } from '@patternfly/react-core';
+import { RedoIcon } from '@patternfly/react-icons';
import PropTypes from 'prop-types';
+import { translate as __ } from 'foremanReact/common/I18n';
-const ButtonTooltip = props => {
- const tooltip = (
- <Tooltip id={`${props.tooltipId}-tooltip-id`}>
- <span>Use default value from settings</span>
- </Tooltip>
- );
-
- return (
- <OverlayTrigger overlay={tooltip} trigger={['hover', 'focus']}>
- <Icon type="fa" name="refresh" />
- </OverlayTrigger>
- );
-};
+const ButtonTooltip = ({ tooltipId }) => (
+ <Tooltip id={tooltipId} content={__('Use default value from settings')}>
+ <RedoIcon />
+ </Tooltip>
+);
ButtonTooltip.propTypes = {
tooltipId: PropTypes.string.isRequired,
};