diff --git a/frontend/package.json b/frontend/package.json index 211a1178405..fc1f9001a07 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -102,7 +102,6 @@ "react-dom": "16.8.6", "react-helmet": "^5.2.1", "react-jsonschema-form": "^1.0.4", - "react-lightweight-tooltip": "1.x", "react-linkify": "^0.2.2", "react-measure": "^2.2.6", "react-modal": "3.x", diff --git a/frontend/packages/dev-console/src/components/pipelineruns/PipelineBars.tsx b/frontend/packages/dev-console/src/components/pipelineruns/PipelineBars.tsx index 03665fae2e4..bcbc6dfd02f 100644 --- a/frontend/packages/dev-console/src/components/pipelineruns/PipelineBars.tsx +++ b/frontend/packages/dev-console/src/components/pipelineruns/PipelineBars.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { VictoryStack, VictoryBar } from 'victory'; -import { Tooltip } from '@console/internal/components/utils/tooltip'; +import { Tooltip } from '@patternfly/react-core'; import { getTaskStatus, runStatus, diff --git a/frontend/packages/dev-console/src/components/progressive-list/ProgressiveList.scss b/frontend/packages/dev-console/src/components/progressive-list/ProgressiveList.scss deleted file mode 100644 index 01e85389200..00000000000 --- a/frontend/packages/dev-console/src/components/progressive-list/ProgressiveList.scss +++ /dev/null @@ -1,6 +0,0 @@ -.odc-progressive-list { - &__button { - padding: 0; - margin: 0 !important; - } -} diff --git a/frontend/packages/dev-console/src/components/progressive-list/ProgressiveList.tsx b/frontend/packages/dev-console/src/components/progressive-list/ProgressiveList.tsx index c87a674ef82..49f6410eb3f 100644 --- a/frontend/packages/dev-console/src/components/progressive-list/ProgressiveList.tsx +++ b/frontend/packages/dev-console/src/components/progressive-list/ProgressiveList.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import ProgressiveListFooter from './ProgressiveListFooter'; import ProgressiveListItem from './ProgressiveListItem'; -import './ProgressiveList.scss'; export interface ProgressiveListProps { visibleItems: string[]; diff --git a/frontend/packages/dev-console/src/components/progressive-list/ProgressiveListFooter.tsx b/frontend/packages/dev-console/src/components/progressive-list/ProgressiveListFooter.tsx index fce5c900cb5..8e356a87a40 100644 --- a/frontend/packages/dev-console/src/components/progressive-list/ProgressiveListFooter.tsx +++ b/frontend/packages/dev-console/src/components/progressive-list/ProgressiveListFooter.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import { Button } from '@patternfly/react-core'; export interface ProgressiveListFooterProps { items: string[]; @@ -29,13 +30,9 @@ const ProgressiveListFooter: React.FC = ({ return ( {preText} - + {postText} ); diff --git a/frontend/public/components/utils/tooltip.tsx b/frontend/public/components/utils/tooltip.tsx deleted file mode 100644 index 8a978781fdb..00000000000 --- a/frontend/public/components/utils/tooltip.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import * as _ from 'lodash-es'; -import * as React from 'react'; -import { Tooltip as RLT } from 'react-lightweight-tooltip'; - -const tooltipOverrides = Object.freeze({ - wrapper: { - color: 'inherit', - display: 'inline-block', - zIndex: 'auto', - }, - tooltip: { - maxWidth: 'none', - minWidth: '170px', - padding: '0', - textAlign: 'center', - zIndex: '1070', - }, - content: { - display: 'block', - fontSize: '12px', - maxWidth: '200px', - padding: '7px 12px', - whiteSpace: 'normal', - }, - arrow: { - borderWidth: '8px', - bottom: '-8px', - marginLeft: '-8px', - }, - gap: { - bottom: '-5px', - height: '5px', - }, -}); - -// Consider this mobile if the device screen width is less than 768. (This value shouldn't change.) -const isMobile = window.screen.width < 768; - -export const Tooltip: React.SFC = ({ content, children, styles, disableOnMobile, hidden = false }) => { - if (disableOnMobile && isMobile || hidden) { - return {children}; - } - const mergedStyles = styles ? _.merge({}, tooltipOverrides, styles) : tooltipOverrides; - return {children}; -}; - -type TooltipProps = { - content: React.ReactNode; - hidden?: boolean; - styles?: any; - disableOnMobile?: boolean; -}; diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 9f0c11dc5d7..1e17a251428 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -10239,10 +10239,6 @@ react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" -react-lightweight-tooltip@1.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/react-lightweight-tooltip/-/react-lightweight-tooltip-1.0.0.tgz#1fb96831b88de21a4d73d02148aae3d8d0aea9bc" - react-linkify@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/react-linkify/-/react-linkify-0.2.2.tgz#55b99b1cc7244446a0f9bdebbe13b2c30f789e65"