Skip to content

Commit

Permalink
fix: combine the className props in the Menu separator (#6884)
Browse files Browse the repository at this point in the history
  • Loading branch information
jijiseong authored Jul 14, 2024
1 parent 0665423 commit d053ad4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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 = () => {
Expand Down

0 comments on commit d053ad4

Please sign in to comment.