File tree Expand file tree Collapse file tree 4 files changed +45
-0
lines changed
Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ import { render } from '@testing-library/react' ;
2+ import { PeopleIcon } from '../icons' ;
3+
4+ describe ( 'PeopleIcon' , ( ) => {
5+ it ( 'renders without errors' , ( ) => {
6+ render ( < PeopleIcon width = { 24 } height = { 24 } /> ) ;
7+ } ) ;
8+
9+ it ( 'applies width and height' , ( ) => {
10+ const { getByTestId } = render ( < PeopleIcon width = { 24 } height = { 24 } /> ) ;
11+ const svgElement = getByTestId ( 'people-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 { KEPPEL_GREEN_FILL , DEFAULT_HEIGHT , DEFAULT_WIDTH } from '../../constants/constants' ;
2+ import { IconProps } from '../types' ;
3+
4+ const PeopleIcon = ( {
5+ width = DEFAULT_WIDTH ,
6+ height = DEFAULT_HEIGHT ,
7+ fill = KEPPEL_GREEN_FILL ,
8+ ...props
9+ } : IconProps ) : JSX . Element => (
10+ < svg
11+ width = { width }
12+ height = { height }
13+ viewBox = "0 0 48 48"
14+ fill = { fill }
15+ data-testid = "people-icon-svg"
16+ xmlns = "http://www.w3.org/2000/svg"
17+ { ...props }
18+ >
19+ < path d = "M3 29.4c0-4.256 8.661-6.4 13-6.4s13 2.144 13 6.4V35H3zM23 14c0 3.867-3.133 7-7 7s-7-3.133-7-7 3.133-7 7-7 7 3.133 7 7m17 4c0 2.762-2.237 5-5 5s-5-2.238-5-5 2.237-5 5-5 5 2.238 5 5" />
20+ < path
21+ fillRule = "evenodd"
22+ clipRule = "evenodd"
23+ d = "M31 35v-5.6c0-1.364-.532-2.511-1.28-3.437C31.57 25.322 33.583 25 35 25c3.337 0 10 1.787 10 5.333V35z"
24+ />
25+ </ svg >
26+ ) ;
27+
28+ export default PeopleIcon ;
Original file line number Diff line number Diff line change 1+ export { default as PeopleIcon } from './PeopleIcon' ;
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ export * from './OpenInNew';
9292export * from './Organization' ;
9393export * from './PanTool' ;
9494export * from './Pattern' ;
95+ export * from './People' ;
9596export * from './Person' ;
9697export * from './Pod' ;
9798export * from './Poll' ;
You can’t perform that action at this time.
0 commit comments