diff --git a/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx b/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx index ee1de9643e5..34ca88339f9 100644 --- a/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx +++ b/components/src/molecules/DropdownMenu/__tests__/DropdownMenu.test.tsx @@ -41,13 +41,11 @@ describe('DropdownMenu', () => { currentOption: mockOptions[0], dropdownType: 'neutral', title: 'Custom Dropdown', - caption: 'Select an option', tooltipText: 'This is a tooltip', } render(props) expect(screen.getByText('Custom Dropdown')).toBeInTheDocument() - expect(screen.getByText('Select an option')).toBeInTheDocument() expect(screen.getByText('Option 1')).toBeInTheDocument() }) diff --git a/components/src/molecules/DropdownMenu/index.tsx b/components/src/molecules/DropdownMenu/index.tsx index af336737fa5..c891eb2c93b 100644 --- a/components/src/molecules/DropdownMenu/index.tsx +++ b/components/src/molecules/DropdownMenu/index.tsx @@ -19,7 +19,6 @@ import { Flex } from '../../primitives' import { Icon } from '../../icons' import { useHoverTooltip } from '../../tooltips' import { useOnClickOutside } from '../../interaction-enhancers' -import { LegacyStyledText } from '../../atoms/StyledText/LegacyStyledText' import { MenuItem } from '../../atoms/MenuList/MenuItem' import { Tooltip } from '../../atoms/Tooltip' import { StyledText } from '../../atoms/StyledText' @@ -55,8 +54,6 @@ export interface DropdownMenuProps { dropdownType?: DropdownBorder /** dropdown title */ title?: string - /** dropdown item caption */ - caption?: string | null /** text for tooltip */ tooltipText?: string | null /** html tabindex property */ @@ -79,7 +76,6 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element { width = '9.125rem', dropdownType = 'rounded', title, - caption, tooltipText, tabIndex = 0, error, @@ -197,14 +193,10 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element { } ` return ( - + {title !== null ? ( - + {title} {tooltipText != null ? ( @@ -222,7 +214,11 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element { ) : null} ) : null} - + { e.preventDefault() @@ -302,11 +298,6 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element { )} - {caption != null ? ( - - {caption} - - ) : null} {error != null ? ( {error}