File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { render } from '@testing-library/react' ;
2+ import { CodeIcon } from '../icons' ;
3+
4+ describe ( 'CodeIcon' , ( ) => {
5+ it ( 'renders without errors' , ( ) => {
6+ render ( < CodeIcon width = { 24 } height = { 24 } /> ) ;
7+ } ) ;
8+
9+ it ( 'applies width and height' , ( ) => {
10+ const { getByTestId } = render ( < CodeIcon width = { 24 } height = { 24 } /> ) ;
11+ const svgElement = getByTestId ( 'code-icon-svg' ) ;
12+ expect ( svgElement . getAttribute ( 'width' ) ) . toBe ( '24' ) ;
13+ expect ( svgElement . getAttribute ( 'height' ) ) . toBe ( '24' ) ;
14+ } ) ;
15+ } ) ;
Original file line number Diff line number Diff line change 1+ import { render } from '@testing-library/react' ;
2+ import { ReplyIcon } from '../icons' ;
3+
4+ describe ( 'ReplyIcon' , ( ) => {
5+ it ( 'renders without errors' , ( ) => {
6+ render ( < ReplyIcon width = { 24 } height = { 24 } /> ) ;
7+ } ) ;
8+
9+ it ( 'uses default width and height' , ( ) => {
10+ const { getByTestId } = render ( < ReplyIcon /> ) ;
11+ const svgElement = getByTestId ( 'reply-icon-svg' ) ;
12+ expect ( svgElement . getAttribute ( 'width' ) ) . toBe ( '24' ) ;
13+ expect ( svgElement . getAttribute ( 'height' ) ) . toBe ( '24' ) ;
14+ } ) ;
15+
16+ it ( 'applies custom width and height' , ( ) => {
17+ const { getByTestId } = render ( < ReplyIcon width = { 32 } height = { 32 } /> ) ;
18+ const svgElement = getByTestId ( 'reply-icon-svg' ) ;
19+ expect ( svgElement . getAttribute ( 'width' ) ) . toBe ( '32' ) ;
20+ expect ( svgElement . getAttribute ( 'height' ) ) . toBe ( '32' ) ;
21+ } ) ;
22+ } ) ;
Original file line number Diff line number Diff line change 1+ import { DEFAULT_HEIGHT , DEFAULT_WIDTH , DEFAULT_FILL_NONE } from '../../constants/constants' ;
2+ import { IconProps } from '../types' ;
3+
4+ export const CodeIcon = ( {
5+ width = DEFAULT_WIDTH ,
6+ height = DEFAULT_HEIGHT ,
7+ fill = DEFAULT_FILL_NONE ,
8+ ...props
9+ } : IconProps ) : JSX . Element => {
10+ return (
11+ < svg
12+ width = { width }
13+ height = { height }
14+ xmlns = "http://www.w3.org/2000/svg"
15+ viewBox = "0 0 24 24"
16+ data-testid = "code-icon-svg"
17+ { ...props }
18+ >
19+ < path
20+ d = "M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"
21+ fill = { fill }
22+ />
23+ </ svg >
24+ ) ;
25+ } ;
26+
27+ export default CodeIcon ;
Original file line number Diff line number Diff line change 1+ export { default as CodeIcon } from './CodeIcon' ;
Original file line number Diff line number Diff line change 1+ import { DEFAULT_HEIGHT , DEFAULT_WIDTH , DEFAULT_FILL_NONE } from '../../constants/constants' ;
2+ import { IconProps } from '../types' ;
3+
4+ export const ReplyIcon = ( {
5+ width = DEFAULT_WIDTH ,
6+ height = DEFAULT_HEIGHT ,
7+ fill = DEFAULT_FILL_NONE ,
8+ title,
9+ ...props
10+ } : IconProps ) : JSX . Element => {
11+ return (
12+ < svg
13+ width = { width }
14+ height = { height }
15+ xmlns = "http://www.w3.org/2000/svg"
16+ viewBox = "0 0 24 24"
17+ data-testid = "reply-icon-svg"
18+ { ...props }
19+ >
20+ { title && < title > { title } </ title > }
21+ < path
22+ d = "M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-10z"
23+ fill = { fill }
24+ />
25+ </ svg >
26+ ) ;
27+ } ;
28+
29+ export default ReplyIcon ;
Original file line number Diff line number Diff line change 1+ export { default as ReplyIcon } from './ReplyIcon' ;
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export * from './Circle';
3333export * from './Clone' ;
3434export * from './Close' ;
3535export * from './Cloud' ;
36+ export * from './Code' ;
3637export * from './CollapseAll' ;
3738export * from './Column' ;
3839export * from './CompareArrows' ;
@@ -137,6 +138,7 @@ export * from './Rectangle';
137138export * from './Redo' ;
138139export * from './Refresh' ;
139140export * from './Remove' ;
141+ export * from './Reply' ;
140142export * from './Reset' ;
141143export * from './Resize' ;
142144export * from './Response' ;
You can’t perform that action at this time.
0 commit comments