Skip to content

[Icon] Add CancelIcon to Sistent#1467

Merged
saurabhraghuvanshii merged 2 commits intolayer5io:masterfrom
rishiraj38:feat/add-cancel-icon
May 3, 2026
Merged

[Icon] Add CancelIcon to Sistent#1467
saurabhraghuvanshii merged 2 commits intolayer5io:masterfrom
rishiraj38:feat/add-cancel-icon

Conversation

@rishiraj38
Copy link
Copy Markdown
Member

@rishiraj38 rishiraj38 commented May 2, 2026

Notes for Reviewers

This PR fixes #1463

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Rishi Raj <rishiraj438gt@gmail.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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;

Comment thread src/icons/Cancel/index.ts
@@ -0,0 +1 @@
export { default as CancelIcon } from './CancelIcon';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

If the component is renamed to Cancel, this export should be updated accordingly.

Suggested change
export { default as CancelIcon } from './CancelIcon';
export { default as Cancel } from './CancelIcon';

@saurabhraghuvanshii saurabhraghuvanshii merged commit f59ebee into layer5io:master May 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add CancelIcon to Sistent

2 participants