Skip to content

Commit 1c52b65

Browse files
authored
Merge pull request #41 from Giveth/add-info-icon
Add info icon
2 parents d55016c + 3047f2a commit 1c52b65

File tree

6 files changed

+116
-1
lines changed

6 files changed

+116
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@giveth/ui-design-system",
3-
"version": "1.6.1",
3+
"version": "1.7.0",
44
"files": [
55
"/lib"
66
],

src/components/icons/Info/Info.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React, { FC } from 'react';
2+
import { IIconProps } from '../type';
3+
import { IconInfo16 } from './Info16';
4+
import { IconInfo24 } from './Info24';
5+
import { IconInfo32 } from './Info32';
6+
7+
export const IconInfo: FC<IIconProps> = ({
8+
size = 16,
9+
color = 'currentColor',
10+
}) => {
11+
switch (size.toString()) {
12+
case '16':
13+
return <IconInfo16 color={color} />;
14+
case '24':
15+
return <IconInfo24 color={color} />;
16+
case '32':
17+
return <IconInfo32 color={color} />;
18+
default:
19+
return <IconInfo24 size={size} color={color} />;
20+
}
21+
};

src/components/icons/Info/Info16.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React, { FC } from 'react';
2+
import { IIconProps } from '../type';
3+
4+
export const IconInfo16: FC<IIconProps> = ({
5+
size = 16,
6+
color = 'currentColor',
7+
}) => (
8+
<svg
9+
width={size}
10+
height={size}
11+
fill='none'
12+
xmlns='http://www.w3.org/2000/svg'
13+
>
14+
<path
15+
fillRule='evenodd'
16+
clipRule='evenodd'
17+
d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8Z'
18+
fill={color}
19+
/>
20+
<line
21+
x1='8'
22+
y1='12.5'
23+
x2='8'
24+
y2='6.5'
25+
stroke={color}
26+
strokeLinecap='round'
27+
/>
28+
<circle cx='8' cy='4' r='1' fill={color} />
29+
</svg>
30+
);

src/components/icons/Info/Info24.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React, { FC } from 'react';
2+
import { IIconProps } from '../type';
3+
4+
export const IconInfo24: FC<IIconProps> = ({
5+
size = 24,
6+
color = 'currentColor',
7+
}) => (
8+
<svg
9+
width={size}
10+
height={size}
11+
fill='none'
12+
xmlns='http://www.w3.org/2000/svg'
13+
>
14+
<path
15+
fillRule='evenodd'
16+
clipRule='evenodd'
17+
d='M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM21.1667 12C21.1667 17.0967 17.0967 21.1667 12 21.1667C6.89111 21.1667 2.83333 17.0967 2.83333 12C2.83333 6.89111 6.89111 2.83333 12 2.83333C17.0967 2.83333 21.1667 6.89111 21.1667 12Z'
18+
fill={color}
19+
/>
20+
<line
21+
x1='12'
22+
y1='17.25'
23+
x2='12'
24+
y2='10.75'
25+
stroke={color}
26+
strokeWidth='1.5'
27+
strokeLinecap='round'
28+
/>
29+
<circle cx='12' cy='7.75' r='1.25' fill={color} />
30+
</svg>
31+
);

src/components/icons/Info/Info32.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React, { FC } from 'react';
2+
import { IIconProps } from '../type';
3+
4+
export const IconInfo32: FC<IIconProps> = ({
5+
size = 32,
6+
color = 'currentColor',
7+
}) => (
8+
<svg
9+
width={size}
10+
height={size}
11+
fill='none'
12+
xmlns='http://www.w3.org/2000/svg'
13+
>
14+
<path
15+
fillRule='evenodd'
16+
clipRule='evenodd'
17+
d='M29 16C29 23.1797 23.1797 29 16 29C8.8203 29 3 23.1797 3 16C3 8.8203 8.8203 3 16 3C23.1797 3 29 8.8203 29 16ZM27.05 16C27.05 22.149 22.149 27.05 16 27.05C9.851 27.05 4.95 22.149 4.95 16C4.95 9.851 9.851 4.95 16 4.95C22.149 4.95 27.05 9.851 27.05 16Z'
18+
fill={color}
19+
/>
20+
<path
21+
d='M16 22V14'
22+
stroke={color}
23+
strokeWidth='2'
24+
strokeLinecap='round'
25+
/>
26+
<circle cx='16' cy='10.5' r='1.5' fill={color} />
27+
</svg>
28+
);

src/components/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ export * from './buttonLinks/OulineButtonLink';
3131
export * from './layout/Container';
3232
export * from './layout/ContainerFluid';
3333

34+
export * from './icons/Info/Info';
35+
export * from './icons/Info/Info16';
36+
export * from './icons/Info/Info24';
37+
export * from './icons/Info/Info32';
38+
3439
export * from './icons/Menu/Menu';
3540
export * from './icons/Menu/Menu16';
3641
export * from './icons/Menu/Menu24';

0 commit comments

Comments
 (0)