diff --git a/packages/components/src/Ansible/Ansible.test.js b/packages/components/src/Ansible/Ansible.test.js deleted file mode 100644 index 6fe7d25c87..0000000000 --- a/packages/components/src/Ansible/Ansible.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import Ansible from './Ansible'; - -describe('Ansible component', () => { - describe('should render correctly', () => { - it('unsupported boolean', () => { - const { container } = render(); - expect(container).toMatchSnapshot(); - }); - - it('unsupported number', () => { - const { container } = render(); - expect(container).toMatchSnapshot(); - }); - - it('supported boolean', () => { - const { container } = render(); - expect(container).toMatchSnapshot(); - }); - - it('supported number', () => { - const { container } = render(); - expect(container).toMatchSnapshot(); - }); - }); -}); diff --git a/packages/components/src/Ansible/Ansible.tsx b/packages/components/src/Ansible/Ansible.tsx index edc2b74473..0a67c5ab3c 100644 --- a/packages/components/src/Ansible/Ansible.tsx +++ b/packages/components/src/Ansible/Ansible.tsx @@ -1,93 +1,10 @@ import React from 'react'; - -import classNames from 'classnames'; - -import './ansible.scss'; - -export interface AnsibleProps extends React.DetailedHTMLProps, HTMLElement> { - /** - * Description that will generate MD docs file - */ - unsupported?: boolean | number; -} +import AnsiblePF, { AnsibleProps } from '@patternfly/react-component-groups/dist/dynamic/Ansible'; /** - * This is a dumb component that only recieves properties from a smart component. - * Dumb components are usually functions and not classes. - * - * @param props the props given by the smart component. + * @deprecated Do not use deprecated Ansible import, the component has been moved to @patternfly/react-component-groups */ - -const Ansible: React.FunctionComponent = ({ unsupported, className, ...props }) => { - const ansibleLogoClass = classNames( - className, - 'Ansible', - { [`is-supported`]: !unsupported || unsupported === 0 }, - { [`is-unsupported`]: unsupported || unsupported === 1 } - ); - - let unsupportedSlash; - let ariaLabels = {}; - if (unsupported) { - unsupportedSlash = ( - - - - - - - - ); - ariaLabels = { - ['disabled']: 'disabled', - ['aria-label']: 'Does not have Ansible support', - }; - } else { - ariaLabels = { ['aria-label']: 'Has Ansible support' }; - } - - return ( - - - - {unsupportedSlash} - - - ); -}; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +const Ansible: React.FunctionComponent = (props) => ; export default Ansible; diff --git a/packages/components/src/Ansible/__snapshots__/Ansible.test.js.snap b/packages/components/src/Ansible/__snapshots__/Ansible.test.js.snap deleted file mode 100644 index f9e7356625..0000000000 --- a/packages/components/src/Ansible/__snapshots__/Ansible.test.js.snap +++ /dev/null @@ -1,159 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Ansible component should render correctly supported boolean 1`] = ` -
- - - - - -
-`; - -exports[`Ansible component should render correctly supported number 1`] = ` -
- - - - - -
-`; - -exports[`Ansible component should render correctly unsupported boolean 1`] = ` -
- - - - - - - - -
-`; - -exports[`Ansible component should render correctly unsupported number 1`] = ` -
- - - - - - - - -
-`; diff --git a/packages/components/src/Ansible/ansible.scss b/packages/components/src/Ansible/ansible.scss deleted file mode 100644 index af5e3f062a..0000000000 --- a/packages/components/src/Ansible/ansible.scss +++ /dev/null @@ -1,14 +0,0 @@ -@import '~@redhat-cloud-services/frontend-components-utilities/styles/_all.scss'; - -i.Ansible { - &.is-supported .st0{ fill: $ins-color--blue; } - &.is-unsupported { - .st0, .st1, .st2 { fill: $ins-color--gray; } - cursor: not-allowed; - } - svg { - height: var(--pf-v5-global--FontSize--xl); - position: relative; - @include rem('top', 4px); - } -}