From ff8a983f370087df01b716be0fb1c4137b1be599 Mon Sep 17 00:00:00 2001 From: jijiseong Date: Sun, 14 Jul 2024 19:58:54 +0900 Subject: [PATCH] fix: combine the className props in the Menu separator --- components/lib/menu/Menu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lib/menu/Menu.js b/components/lib/menu/Menu.js index 2dd116e8f2..2b8313cf0c 100644 --- a/components/lib/menu/Menu.js +++ b/components/lib/menu/Menu.js @@ -319,13 +319,13 @@ export const Menu = React.memo( ); }; - const createSeparator = (index) => { + const createSeparator = (item, index) => { const key = idState + '_separator_' + index; const separatorProps = mergeProps( { id: key, key, - className: cx('separator'), + className: classNames(item.className, cx('separator')), role: 'separator' }, ptm('separator') @@ -424,7 +424,7 @@ export const Menu = React.memo( }; const createItem = (item, index) => { - return item.separator ? createSeparator(index) : item.items ? createSubmenu(item, index) : createMenuItem(item, index); + return item.separator ? createSeparator(item, index) : item.items ? createSubmenu(item, index) : createMenuItem(item, index); }; const createMenu = () => {