Skip to content

Commit f34dd68

Browse files
Merge branch 'master' into feature/icons/refresh-icon
2 parents d7e06a3 + ea6926b commit f34dd68

File tree

16 files changed

+203
-0
lines changed

16 files changed

+203
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
});
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { DEFAULT_HEIGHT, DEFAULT_WIDTH, KEPPEL_GREEN_FILL } from '../../constants/constants';
2+
import { IconProps } from '../types';
3+
4+
export const GroupAddIcon = ({
5+
width = DEFAULT_WIDTH,
6+
height = DEFAULT_HEIGHT,
7+
fill = KEPPEL_GREEN_FILL,
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+
{...props}
17+
>
18+
<path
19+
d="M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"
20+
fill={fill}
21+
/>
22+
</svg>
23+
);
24+
};
25+
export default GroupAddIcon;

src/icons/GroupAdd/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as GroupAdd } from './GroupAddIcon';

src/icons/People/PeopleIcon.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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;

src/icons/People/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as PeopleIcon } from './PeopleIcon';
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { KEPPEL_GREEN_FILL, DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants';
2+
import { IconProps } from '../types';
3+
4+
export const PlayArrowIcon = ({
5+
width = DEFAULT_WIDTH,
6+
height = DEFAULT_HEIGHT,
7+
fill = KEPPEL_GREEN_FILL,
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+
{...props}
17+
>
18+
<path d="M8 5v14l11-7z" fill={fill} />
19+
</svg>
20+
);
21+
};
22+
23+
export default PlayArrowIcon;

src/icons/PlayArrow/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as PlayArrowIcon } from './PlayArrowIcon';

src/icons/Science/ScienceIcon.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants';
2+
import { IconProps } from '../types';
3+
4+
const KEPPEL_GREEN_FILL = '#00B39F';
5+
6+
export const ScienceIcon = ({
7+
width = DEFAULT_WIDTH,
8+
height = DEFAULT_HEIGHT,
9+
fill = KEPPEL_GREEN_FILL,
10+
...props
11+
}: IconProps): JSX.Element => {
12+
return (
13+
<svg
14+
width={width}
15+
height={height}
16+
xmlns="http://www.w3.org/2000/svg"
17+
viewBox="0 0 24 24"
18+
data-testid="science-icon-svg"
19+
{...props}
20+
>
21+
<path
22+
d="M19.8 18.4L14 10.67V6.5l1.35-1.69c.26-.33.03-.81-.39-.81H9.04c-.42 0-.65.48-.39.81L10 6.5v4.17L4.2 18.4c-.49.66-.02 1.6.8 1.6h14c.82 0 1.29-.94.8-1.6z"
23+
fill={fill}
24+
/>
25+
</svg>
26+
);
27+
};
28+
29+
export default ScienceIcon;

src/icons/Science/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as ScienceIcon } from './ScienceIcon';

src/icons/Timer/TimerIcon.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { DEFAULT_HEIGHT, DEFAULT_WIDTH, KEPPEL_GREEN_FILL } from '../../constants/constants';
2+
import { IconProps } from '../types';
3+
4+
export const TimerIcon = ({
5+
width = DEFAULT_WIDTH,
6+
height = DEFAULT_HEIGHT,
7+
fill = KEPPEL_GREEN_FILL,
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+
{...props}
17+
>
18+
<path d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M13 14h-2V8h2z" fill={fill} />
19+
</svg>
20+
);
21+
};
22+
23+
export default TimerIcon;

0 commit comments

Comments
 (0)