fix: Pin icons different colored, closes #2939
This commit is contained in:
@@ -16,7 +16,7 @@ type Props = {
|
||||
as?: string | React.ComponentType<any>;
|
||||
hide?: () => void;
|
||||
level?: number;
|
||||
icon?: React.ReactNode;
|
||||
icon?: React.ReactElement;
|
||||
};
|
||||
|
||||
const MenuItem = ({
|
||||
@@ -73,7 +73,11 @@ const MenuItem = ({
|
||||
|
||||
</>
|
||||
)}
|
||||
{icon && <MenuIconWrapper>{icon}</MenuIconWrapper>}
|
||||
{icon && (
|
||||
<MenuIconWrapper>
|
||||
{React.cloneElement(icon, { color: "currentColor" })}
|
||||
</MenuIconWrapper>
|
||||
)}
|
||||
{children}
|
||||
</MenuAnchor>
|
||||
)}
|
||||
|
||||
@@ -5,6 +5,7 @@ const MenuIconWrapper = styled.span`
|
||||
height: 24px;
|
||||
margin-right: 6px;
|
||||
margin-left: -4px;
|
||||
color: ${({ theme }) => theme.textSecondary};
|
||||
`;
|
||||
|
||||
export default MenuIconWrapper;
|
||||
|
||||
Reference in New Issue
Block a user