From 902a31d0736fdd6e7049b4ddcfb9ee5a4b5e7231 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Thu, 21 May 2020 14:10:47 -0400 Subject: [PATCH] Switch tooltips to FieldTooltips --- .../InventorySourceDetail.jsx | 37 +++++-------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx b/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx index 0fc18e12c6..05dff6c141 100644 --- a/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx +++ b/awx/ui_next/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.jsx @@ -2,10 +2,8 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; -import styled from 'styled-components'; -import { QuestionCircleIcon as PFQuestionCircleIcon } from '@patternfly/react-icons'; -import { Button, Chip, List, ListItem, Tooltip } from '@patternfly/react-core'; +import { Button, Chip, List, ListItem } from '@patternfly/react-core'; import AlertModal from '../../../components/AlertModal'; import { CardBody, CardActionsRow } from '../../../components/Card'; import ChipGroup from '../../../components/ChipGroup'; @@ -14,6 +12,7 @@ import ContentError from '../../../components/ContentError'; import ContentLoading from '../../../components/ContentLoading'; import CredentialChip from '../../../components/CredentialChip'; import DeleteButton from '../../../components/DeleteButton'; +import { FieldTooltip } from '../../../components/FormField'; import InventorySourceSyncButton from '../shared/InventorySourceSyncButton'; import { DetailList, @@ -24,10 +23,6 @@ import ErrorDetail from '../../../components/ErrorDetail'; import useRequest from '../../../util/useRequest'; import { InventorySourcesAPI } from '../../../api'; -const QuestionCircleIcon = styled(PFQuestionCircleIcon)` - margin-left: 10px; -`; - function InventorySourceDetail({ inventorySource, i18n }) { const { created, @@ -119,7 +114,7 @@ function InventorySourceDetail({ inventorySource, i18n }) { {overwrite && ( {i18n._(t`Overwrite`)} - {i18n._(t`If checked, any hosts and groups that were @@ -136,16 +131,13 @@ function InventorySourceDetail({ inventorySource, i18n }) { untouched by the inventory update process.`)} } - position="top" - > - - + /> )} {overwrite_vars && ( {i18n._(t`Overwrite variables`)} - {i18n._(t`If checked, all variables for child groups @@ -158,37 +150,28 @@ function InventorySourceDetail({ inventorySource, i18n }) { external source.`)} } - position="top" - > - - + /> )} {update_on_launch && ( {i18n._(t`Update on launch`)} - - - + /> )} {update_on_project_update && ( {i18n._(t`Update on project update`)} - - - + /> )}