[Icon] Add CancelIcon to Sistent#1467
Merged
saurabhraghuvanshii merged 2 commits intolayer5io:masterfrom May 3, 2026
Merged
Conversation
Signed-off-by: Rishi Raj <rishiraj438gt@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new CancelIcon component along with its corresponding export files. The review feedback suggests renaming the component to Cancel to align with the naming conventions used for other icons in the library, ensuring consistency across the codebase.
Comment on lines
+4
to
+29
| export const CancelIcon = ({ | ||
| width = DEFAULT_WIDTH, | ||
| height = DEFAULT_HEIGHT, | ||
| fill = DEFAULT_FILL_NONE, | ||
| title, | ||
| ...props | ||
| }: IconProps): JSX.Element => { | ||
| return ( | ||
| <svg | ||
| width={width} | ||
| height={height} | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| viewBox="0 0 24 24" | ||
| data-testid="cancel-icon-svg" | ||
| {...props} | ||
| > | ||
| {title && <title>{title}</title>} | ||
| <path | ||
| d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" | ||
| fill={fill} | ||
| /> | ||
| </svg> | ||
| ); | ||
| }; | ||
|
|
||
| export default CancelIcon; |
Contributor
There was a problem hiding this comment.
For consistency with the majority of icons in this library (e.g., Academy, Add, Close, Done), consider renaming the component to Cancel. Most icons in this repository do not use the Icon suffix in their component names. If you decide to rename it, please also update the filename and the corresponding export in the index file.
export const Cancel = ({
width = DEFAULT_WIDTH,
height = DEFAULT_HEIGHT,
fill = DEFAULT_FILL_NONE,
title,
...props
}: IconProps): JSX.Element => {
return (
<svg
width={width}
height={height}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
data-testid="cancel-icon-svg"
{...props}
>
{title && <title>{title}</title>}
<path
d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"
fill={fill}
/>
</svg>
);
};
export default Cancel;
| @@ -0,0 +1 @@ | |||
| export { default as CancelIcon } from './CancelIcon'; | |||
Contributor
saurabhraghuvanshii
approved these changes
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes for Reviewers
This PR fixes #1463
Signed commits