Skip to content

Commit bfc74c3

Browse files
committed
feat: add GithubIcon and GoogleIcon components with customizable properties
Signed-off-by: Amit Amrutiya <amitamrutiya2210@gmail.com>
1 parent 4194842 commit bfc74c3

4 files changed

Lines changed: 102 additions & 0 deletions

File tree

src/icons/Github/GithubIcon.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
interface GithubIconProps {
2+
height?: string | number;
3+
width?: string | number;
4+
className?: string;
5+
}
6+
7+
export default function GithubIcon({
8+
height = '1.45rem',
9+
width = '1.45rem',
10+
className
11+
}: GithubIconProps) {
12+
return (
13+
<svg
14+
height={height}
15+
width={width}
16+
className={className}
17+
xmlns="http://www.w3.org/2000/svg"
18+
viewBox="0 0 400 400"
19+
>
20+
<path
21+
fill="currentColor"
22+
fillRule="evenodd"
23+
clipRule="evenodd"
24+
d="M203.9,60c-75.6,0-137,61.3-137,137c0,60.5,39.2,111.9,93.7,130c6.8,1.3,9.3-3,9.3-6.6c0-3.3-0.1-11.9-0.2-23.3
25+
c-38.1,8.3-46.1-18.4-46.1-18.4c-6.2-15.8-15.2-20-15.2-20c-12.4-8.5,0.9-8.3,0.9-8.3c13.7,1,21,14.1,21,14.1
26+
c12.2,20.9,32.1,14.9,39.9,11.4c1.2-8.9,4.8-14.9,8.7-18.3c-30.4-3.5-62.4-15.2-62.4-67.7c0-15,5.3-27.2,14.1-36.8
27+
c-1.4-3.5-6.1-17.4,1.3-36.3c0,0,11.5-3.7,37.7,14c10.9-3,22.6-4.6,34.3-4.6c11.6,0.1,23.4,1.6,34.3,4.6c26.2-17.7,37.6-14,37.6-14
28+
c7.5,18.9,2.8,32.8,1.4,36.3c8.8,9.6,14.1,21.8,14.1,36.8c0,52.6-32,64.2-62.5,67.6c4.9,4.2,9.3,12.6,9.3,25.4
29+
c0,18.3-0.2,33.1-0.2,37.6c0,3.7,2.5,7.9,9.4,6.6c54.4-18.2,93.6-69.5,93.6-130C340.9,121.3,279.5,60,203.9,60z"
30+
/>
31+
</svg>
32+
);
33+
}

src/icons/Github/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import GithubIcon from './GithubIcon';
2+
3+
export { GithubIcon };

src/icons/Google/GoogleIcon.tsx

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import React from 'react';
2+
3+
interface GoogleIconProps {
4+
height: number;
5+
width: number;
6+
style?: React.CSSProperties;
7+
}
8+
9+
const GoogleIcon: React.FC<GoogleIconProps> = ({ height, width, style }) => {
10+
return (
11+
<svg
12+
xmlns="http://www.w3.org/2000/svg"
13+
width={width}
14+
height={height}
15+
viewBox="0 0 256 256"
16+
style={style}
17+
>
18+
<g
19+
fillOpacity="0"
20+
strokeMiterlimit="10"
21+
fontFamily="none"
22+
fontSize="none"
23+
fontWeight="none"
24+
textAnchor="none"
25+
style={{ mixBlendMode: 'normal' }}
26+
>
27+
<path d="M0 256V0h256v256z"></path>
28+
</g>
29+
<g
30+
fill="none"
31+
strokeMiterlimit="10"
32+
fontFamily="none"
33+
fontSize="none"
34+
fontWeight="none"
35+
textAnchor="none"
36+
style={{ mixBlendMode: 'normal' }}
37+
>
38+
<path
39+
fill="#ffc107"
40+
d="M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z"
41+
transform="scale(5.33333)"
42+
></path>
43+
<path
44+
fill="#ff3d00"
45+
d="M6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z"
46+
transform="scale(5.33333)"
47+
></path>
48+
<path
49+
fill="#4caf50"
50+
d="M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.91 11.91 0 0124 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z"
51+
transform="scale(5.33333)"
52+
></path>
53+
<path
54+
fill="#1976d2"
55+
d="M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 01-4.087 5.571l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z"
56+
transform="scale(5.33333)"
57+
></path>
58+
</g>
59+
</svg>
60+
);
61+
};
62+
63+
export default GoogleIcon;

src/icons/Google/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import GoogleIcon from './GoogleIcon';
2+
3+
export { GoogleIcon };

0 commit comments

Comments
 (0)