diff --git a/src/components/forms/Dropdown/Dropdown.stories.tsx b/src/components/forms/Dropdown/Dropdown.stories.tsx deleted file mode 100644 index 12a65db07d..0000000000 --- a/src/components/forms/Dropdown/Dropdown.stories.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react' - -import { Dropdown } from './Dropdown' -import { Label } from '../Label/Label' - -export default { - title: 'Components/Dropdown', - component: 'Dropdown', - parameters: { - docs: { - description: { - component: ` -### Deprecated USWDS 2.x Dropdown component - -⚠️ Dropdown is deprecated and will be removed in the future. Please use the Select component instead. - -Source: https://designsystem.digital.gov/components/dropdown/ -`, - }, - }, - }, -} - -export const defaultDropdown = (): React.ReactElement => ( - - - - - - -) - -export const withDefaultValue = (): React.ReactElement => ( - - - - - - -) - -export const withLabel = (): React.ReactElement => ( - <> - - - - - - - - -) - -export const disabled = (): React.ReactElement => ( - - - - - - -) diff --git a/src/components/forms/Dropdown/Dropdown.test.tsx b/src/components/forms/Dropdown/Dropdown.test.tsx deleted file mode 100644 index 505baff170..0000000000 --- a/src/components/forms/Dropdown/Dropdown.test.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react' -import { render } from '@testing-library/react' -jest.mock('../../../deprecation') -import { deprecationWarning } from '../../../deprecation' - -import { Dropdown } from './Dropdown' - -describe('Dropdown component', () => { - it('renders without errors, displaying a deprecation warning', () => { - const { queryByTestId } = render( - - - - - - - ) - expect(queryByTestId('Select')).toBeInTheDocument() - expect(deprecationWarning).toHaveBeenCalledTimes(1) - expect(deprecationWarning).toHaveBeenCalledWith( - 'Dropdown is deprecated and will be removed in the future. Please use the Select component instead.' - ) - }) -}) diff --git a/src/components/forms/Dropdown/Dropdown.tsx b/src/components/forms/Dropdown/Dropdown.tsx deleted file mode 100644 index 0d162e5769..0000000000 --- a/src/components/forms/Dropdown/Dropdown.tsx +++ /dev/null @@ -1,11 +0,0 @@ -/* - TODO: Remove this component -*/ - -import { Select } from '../Select/Select' -import { withDeprecationWarning } from '../../hoc/withDeprecationWarning' - -export const Dropdown = withDeprecationWarning( - Select, - 'Dropdown is deprecated and will be removed in the future. Please use the Select component instead.' -) diff --git a/src/components/forms/Form/Form.stories.tsx b/src/components/forms/Form/Form.stories.tsx index 21e8eab4be..294cd28a13 100644 --- a/src/components/forms/Form/Form.stories.tsx +++ b/src/components/forms/Form/Form.stories.tsx @@ -4,7 +4,6 @@ import { Form } from './Form' import { Alert } from '../../Alert/Alert' import { Button } from '../../Button/Button' -import { Dropdown } from '../Dropdown/Dropdown' import { ErrorMessage } from '../ErrorMessage/ErrorMessage' import { Fieldset } from '../Fieldset/Fieldset' import { FormGroup } from '../FormGroup/FormGroup' @@ -12,6 +11,7 @@ import { Label } from '../Label/Label' import { RequiredMarker } from '../Label/RequiredMarker' import { TextInput } from '../TextInput/TextInput' import { Textarea } from '../Textarea/Textarea' +import { Select } from '../Select/Select' export default { title: 'Components/Form templates', @@ -129,7 +129,7 @@ export const addressForm = (): React.ReactElement => ( - +