Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/icons/MergeOutlinedIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { SvgIcon, SvgIconProps } from '@mui/material';

export const MergeOutlinedIcon: React.FC<SvgIconProps> = (props) => {
return (
<SvgIcon {...props}>
<path d="M6.41 21 5 19.59l4.83-4.83c.75-.75 1.17-1.77 1.17-2.83v-5.1L9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83v5.1c0 1.06.42 2.08 1.17 2.83L19 19.59 17.59 21 12 15.41z" />
</SvgIcon>
);
};
Comment on lines +4 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For SVG icons in a React application, it is a best practice to wrap the component in React.memo to prevent unnecessary re-renders when the parent component updates. Additionally, adding a displayName is helpful for debugging in React DevTools.

Also, consider if the Icon suffix is necessary for consistency. While some icons in this repository use it, the majority (e.g., Search, Settings, Share) do not.

Suggested change
export const MergeOutlinedIcon: React.FC<SvgIconProps> = (props) => {
return (
<SvgIcon {...props}>
<path d="M6.41 21 5 19.59l4.83-4.83c.75-.75 1.17-1.77 1.17-2.83v-5.1L9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83v5.1c0 1.06.42 2.08 1.17 2.83L19 19.59 17.59 21 12 15.41z" />
</SvgIcon>
);
};
export const MergeOutlinedIcon = React.memo((props: SvgIconProps) => (
<SvgIcon {...props}>
<path d="M6.41 21 5 19.59l4.83-4.83c.75-.75 1.17-1.77 1.17-2.83v-5.1L9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83v5.1c0 1.06.42 2.08 1.17 2.83L19 19.59 17.59 21 12 15.41z" />
</SvgIcon>
));
MergeOutlinedIcon.displayName = 'MergeOutlinedIcon';

1 change: 1 addition & 0 deletions src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export * from './Logout';
export * from './Mendeley';
export * from './Menu';
export { default as MergeActionIcon } from './MergeActionIcon';
export * from './MergeOutlinedIcon';
export * from './Meshery';
export * from './MesheryFilter';
export * from './MesheryOperator';
Expand Down
Loading