From 35dd691169492091404f1b387a89253cd04dfeda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?w=C5=AB=20y=C4=81ng?= Date: Thu, 14 Dec 2023 11:55:25 +0800 Subject: [PATCH] feat(dropdown): remove dropdown left special style (#2663) --- src/_common | 2 +- src/dropdown/DropdownMenu.tsx | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/_common b/src/_common index c06bc0962f..f7f15f02f1 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit c06bc0962fc97eba87be69bfea8c42a8bb97a4a3 +Subproject commit f7f15f02f11d3d387af6b18685ac9b10ee32be19 diff --git a/src/dropdown/DropdownMenu.tsx b/src/dropdown/DropdownMenu.tsx index f4bc189508..68f610c211 100644 --- a/src/dropdown/DropdownMenu.tsx +++ b/src/dropdown/DropdownMenu.tsx @@ -1,7 +1,7 @@ import React, { ReactElement, useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; import throttle from 'lodash/throttle'; -import { ChevronRightIcon as TdIconChevronRight, ChevronLeftIcon as TdIconChevronLeft } from 'tdesign-icons-react'; +import { ChevronRightIcon as TdIconChevronRight } from 'tdesign-icons-react'; import useConfig from '../hooks/useConfig'; import { DropdownProps } from './Dropdown'; import TDivider from '../divider'; @@ -24,9 +24,8 @@ const DropdownMenu: React.FC = (props) => { const dropdownClass = `${classPrefix}-dropdown`; const dropdownMenuClass = `${dropdownClass}__menu`; const [panelTopContentHeight, setPanelTopContentHeight] = useState(null); - const { ChevronRightIcon, ChevronLeftIcon } = useGlobalIcon({ + const { ChevronRightIcon } = useGlobalIcon({ ChevronRightIcon: TdIconChevronRight, - ChevronLeftIcon: TdIconChevronLeft, }); const menuRef = useRef(); @@ -89,17 +88,8 @@ const DropdownMenu: React.FC = (props) => { isSubmenu={true} >
- {direction === 'right' ? ( - <> - {optionItem.content} - - - ) : ( - <> - - {optionItem.content} - - )} + {optionItem.content} +