Skip to content

Commit

Permalink
chore: add EqualsIcon (#2317)
Browse files Browse the repository at this point in the history
* chore: update

* Create real-seahorses-accept.md
  • Loading branch information
anuraghazra committed Jul 23, 2024
1 parent e322332 commit f036ef5
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 835 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-seahorses-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@razorpay/blade": minor
---

feat: add EqualsIcon
836 changes: 1 addition & 835 deletions packages/blade/scripts/icons.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import EqualsIcon from '.';
import renderWithTheme from '~utils/testing/renderWithTheme.native';

describe('<EqualsIcon />', () => {
it('should render EqualsIcon', () => {
const renderTree = renderWithTheme(
<EqualsIcon color="feedback.icon.neutral.intense" size="large" />,
).toJSON();
expect(renderTree).toMatchSnapshot();
});
});
20 changes: 20 additions & 0 deletions packages/blade/src/components/Icons/EqualsIcon/EqualsIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Svg, Path } from '../_Svg';
import type { IconComponent } from '..';
import useIconProps from '../useIconProps';

const EqualsIcon: IconComponent = ({ size, color, ...styledProps }) => {
const { height, width, iconColor } = useIconProps({ size, color });

return (
<Svg {...styledProps} width={width} height={height} viewBox="0 0 24 24" fill="none">
<Path
fillRule="evenodd"
clipRule="evenodd"
d="M5 8C4.44772 8 4 8.44772 4 9C4 9.55228 4.44772 10 5 10H19C19.5523 10 20 9.55228 20 9C20 8.44772 19.5523 8 19 8H5ZM5 14C4.44772 14 4 14.4477 4 15C4 15.5523 4.44772 16 5 16H19C19.5523 16 20 15.5523 20 15C20 14.4477 19.5523 14 19 14H5Z"
fill={iconColor}
/>
</Svg>
);
};

export default EqualsIcon;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import EqualsIcon from './';
import renderWithTheme from '~utils/testing/renderWithTheme.web';

describe('<EqualsIcon />', () => {
it('should render EqualsIcon', () => {
const { container } = renderWithTheme(
<EqualsIcon color="feedback.icon.neutral.intense" size="large" />,
);
expect(container).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<EqualsIcon /> should render EqualsIcon 1`] = `
<View
style={
{
"flex": 1,
}
}
>
<RNSVGSvgView
accessibilityElementsHidden={true}
align="xMidYMid"
bbHeight="20px"
bbWidth="20px"
data-blade-component="icon"
fill="none"
focusable={false}
height="20px"
importantForAccessibility="no-hide-descendants"
meetOrSlice={0}
minX={0}
minY={0}
style={
[
{
"backgroundColor": "transparent",
"borderWidth": 0,
},
[
{},
],
{
"flex": 0,
"height": 20,
"width": 20,
},
]
}
vbHeight={24}
vbWidth={24}
width="20px"
>
<RNSVGGroup
fill={null}
propList={
[
"fill",
]
}
>
<RNSVGPath
clipRule={0}
d="M5 8C4.44772 8 4 8.44772 4 9C4 9.55228 4.44772 10 5 10H19C19.5523 10 20 9.55228 20 9C20 8.44772 19.5523 8 19 8H5ZM5 14C4.44772 14 4 14.4477 4 15C4 15.5523 4.44772 16 5 16H19C19.5523 16 20 15.5523 20 15C20 14.4477 19.5523 14 19 14H5Z"
fill={
{
"payload": 4280563015,
"type": 0,
}
}
fillRule={0}
propList={
[
"fill",
"fillRule",
]
}
/>
</RNSVGGroup>
</RNSVGSvgView>
</View>
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<EqualsIcon /> should render EqualsIcon 1`] = `
<div>
<svg
aria-hidden="true"
class="Svgweb__StyledSvg-vcmjs8-0"
data-blade-component="icon"
fill="none"
height="20px"
viewBox="0 0 24 24"
width="20px"
>
<path
clip-rule="evenodd"
d="M5 8C4.44772 8 4 8.44772 4 9C4 9.55228 4.44772 10 5 10H19C19.5523 10 20 9.55228 20 9C20 8.44772 19.5523 8 19 8H5ZM5 14C4.44772 14 4 14.4477 4 15C4 15.5523 4.44772 16 5 16H19C19.5523 16 20 15.5523 20 15C20 14.4477 19.5523 14 19 14H5Z"
data-blade-component="svg-path"
fill="hsla(211, 33%, 21%, 1)"
fill-rule="evenodd"
/>
</svg>
</div>
`;
1 change: 1 addition & 0 deletions packages/blade/src/components/Icons/EqualsIcon/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './EqualsIcon';
2 changes: 2 additions & 0 deletions packages/blade/src/components/Icons/iconMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ import EditComposeIconComponent from './EditComposeIcon';
import EditIconComponent from './EditIcon';
import EditInlineIconComponent from './EditInlineIcon';
import EducationIconComponent from './EducationIcon';
import EqualsIconComponent from './EqualsIcon';
import EscrowAccountIconComponent from './EscrowAccountIcon';
import ExportIconComponent from './ExportIcon';
import ExternalLinkIconComponent from './ExternalLinkIcon';
Expand Down Expand Up @@ -472,6 +473,7 @@ const iconMap: Record<string, IconComponent> = {
EditIcon: EditIconComponent,
EditInlineIcon: EditInlineIconComponent,
EducationIcon: EducationIconComponent,
EqualsIcon: EqualsIconComponent,
EscrowAccountIcon: EscrowAccountIconComponent,
ExportIcon: ExportIconComponent,
ExternalLinkIcon: ExternalLinkIconComponent,
Expand Down
1 change: 1 addition & 0 deletions packages/blade/src/components/Icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export { default as EditComposeIcon } from './EditComposeIcon';
export { default as EditIcon } from './EditIcon';
export { default as EditInlineIcon } from './EditInlineIcon';
export { default as EducationIcon } from './EducationIcon';
export { default as EqualsIcon } from './EqualsIcon';
export { default as EscrowAccountIcon } from './EscrowAccountIcon';
export { default as ExportIcon } from './ExportIcon';
export { default as ExternalLinkIcon } from './ExternalLinkIcon';
Expand Down

0 comments on commit f036ef5

Please sign in to comment.