From 67014bb4cc35730ea6860ef63c3b91572044717a Mon Sep 17 00:00:00 2001 From: kkatusic Date: Mon, 17 Jun 2024 13:40:10 +0200 Subject: [PATCH 1/3] fix: add warning icon --- src/components/icons/Warning/Warning.tsx | 21 ++++++++++++++++++ src/components/icons/Warning/Warning16.tsx | 22 +++++++++++++++++++ src/components/icons/Warning/Warning24.tsx | 22 +++++++++++++++++++ src/components/icons/Warning/Warning32.tsx | 22 +++++++++++++++++++ src/components/icons/index.tsx | 4 ++++ src/stories/icons/Warning/Warning.stories.tsx | 19 ++++++++++++++++ .../icons/Warning/Warning16.stories.tsx | 19 ++++++++++++++++ .../icons/Warning/Warning24.stories.tsx | 19 ++++++++++++++++ .../icons/Warning/Warning32.stories.tsx | 19 ++++++++++++++++ 9 files changed, 167 insertions(+) create mode 100644 src/components/icons/Warning/Warning.tsx create mode 100644 src/components/icons/Warning/Warning16.tsx create mode 100644 src/components/icons/Warning/Warning24.tsx create mode 100644 src/components/icons/Warning/Warning32.tsx create mode 100644 src/stories/icons/Warning/Warning.stories.tsx create mode 100644 src/stories/icons/Warning/Warning16.stories.tsx create mode 100644 src/stories/icons/Warning/Warning24.stories.tsx create mode 100644 src/stories/icons/Warning/Warning32.stories.tsx diff --git a/src/components/icons/Warning/Warning.tsx b/src/components/icons/Warning/Warning.tsx new file mode 100644 index 0000000..6276678 --- /dev/null +++ b/src/components/icons/Warning/Warning.tsx @@ -0,0 +1,21 @@ +import React, { FC } from 'react'; +import { IIconProps } from '../type'; +import { IconWarning16 } from './Warning16'; +import { IconWarning24 } from './Warning24'; +import { IconWarning32 } from './Warning32'; + +export const IconWarning: FC = ({ + size = 16, + color = 'currentColor', +}) => { + switch (size.toString()) { + case '16': + return ; + case '24': + return ; + case '32': + return ; + default: + return ; + } +}; diff --git a/src/components/icons/Warning/Warning16.tsx b/src/components/icons/Warning/Warning16.tsx new file mode 100644 index 0000000..4b7e150 --- /dev/null +++ b/src/components/icons/Warning/Warning16.tsx @@ -0,0 +1,22 @@ +import React, { FC } from 'react'; +import { IIconProps } from '../type'; + +export const IconWarning16: FC = ({ + size = 16, + color = 'currentColor', +}) => ( + + + +); diff --git a/src/components/icons/Warning/Warning24.tsx b/src/components/icons/Warning/Warning24.tsx new file mode 100644 index 0000000..b6d600d --- /dev/null +++ b/src/components/icons/Warning/Warning24.tsx @@ -0,0 +1,22 @@ +import React, { FC } from 'react'; +import { IIconProps } from '../type'; + +export const IconWarning24: FC = ({ + size = 24, + color = 'currentColor', +}) => ( + + + +); diff --git a/src/components/icons/Warning/Warning32.tsx b/src/components/icons/Warning/Warning32.tsx new file mode 100644 index 0000000..4bd7631 --- /dev/null +++ b/src/components/icons/Warning/Warning32.tsx @@ -0,0 +1,22 @@ +import React, { FC } from 'react'; +import { IIconProps } from '../type'; + +export const IconWarning32: FC = ({ + size = 32, + color = 'currentColor', +}) => ( + + + +); diff --git a/src/components/icons/index.tsx b/src/components/icons/index.tsx index 5a15c23..6eb2321 100644 --- a/src/components/icons/index.tsx +++ b/src/components/icons/index.tsx @@ -489,3 +489,7 @@ export * from './Estimated/Estimated'; export * from './Estimated/Estimated16'; export * from './Estimated/Estimated24'; export * from './Estimated/Estimated32'; +export * from './Warning/Warning'; +export * from './Warning/Warning16'; +export * from './Warning/Warning24'; +export * from './Warning/Warning32'; \ No newline at end of file diff --git a/src/stories/icons/Warning/Warning.stories.tsx b/src/stories/icons/Warning/Warning.stories.tsx new file mode 100644 index 0000000..6683a97 --- /dev/null +++ b/src/stories/icons/Warning/Warning.stories.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { ComponentStory, ComponentMeta } from '@storybook/react'; + +import { IconWarning } from '../../../components/icons/Warning/Warning'; + +export default { + title: 'Example/Icons/Warning/Warning', + component: IconWarning, +} as ComponentMeta; + +const Template: ComponentStory = args => ( + +); + +export const Warning = Template.bind({}); +Warning.args = { + color: 'white', + size: 24, +}; diff --git a/src/stories/icons/Warning/Warning16.stories.tsx b/src/stories/icons/Warning/Warning16.stories.tsx new file mode 100644 index 0000000..061f59e --- /dev/null +++ b/src/stories/icons/Warning/Warning16.stories.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { ComponentStory, ComponentMeta } from '@storybook/react'; + +import { IconWarning16 } from '../../../components/icons/Warning/Warning16'; + +export default { + title: 'Example/Icons/Warning/Warning16', + component: IconWarning16, +} as ComponentMeta; + +const Template: ComponentStory = args => ( + +); + +export const Warning16 = Template.bind({}); +Warning16.args = { + color: 'white', + size: 16, +}; diff --git a/src/stories/icons/Warning/Warning24.stories.tsx b/src/stories/icons/Warning/Warning24.stories.tsx new file mode 100644 index 0000000..0559b03 --- /dev/null +++ b/src/stories/icons/Warning/Warning24.stories.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { ComponentStory, ComponentMeta } from '@storybook/react'; + +import { IconWarning24 } from '../../../components/icons/Warning/Warning24'; + +export default { + title: 'Example/Icons/Warning/Warning24', + component: IconWarning24, +} as ComponentMeta; + +const Template: ComponentStory = args => ( + +); + +export const Warning24 = Template.bind({}); +Warning24.args = { + color: 'white', + size: 24, +}; diff --git a/src/stories/icons/Warning/Warning32.stories.tsx b/src/stories/icons/Warning/Warning32.stories.tsx new file mode 100644 index 0000000..4e1c960 --- /dev/null +++ b/src/stories/icons/Warning/Warning32.stories.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { ComponentStory, ComponentMeta } from '@storybook/react'; + +import { IconWarning32 } from '../../../components/icons/Warning/Warning32'; + +export default { + title: 'Example/Icons/Warning/Warning32', + component: IconWarning32, +} as ComponentMeta; + +const Template: ComponentStory = args => ( + +); + +export const Warning32 = Template.bind({}); +Warning32.args = { + color: 'white', + size: 32, +}; From 174a20e3df5746f6ff45981ec45a9397d8110bce Mon Sep 17 00:00:00 2001 From: kkatusic Date: Mon, 17 Jun 2024 13:41:50 +0200 Subject: [PATCH 2/3] fix: esllint end of file --- src/components/icons/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/icons/index.tsx b/src/components/icons/index.tsx index 6eb2321..994187e 100644 --- a/src/components/icons/index.tsx +++ b/src/components/icons/index.tsx @@ -492,4 +492,4 @@ export * from './Estimated/Estimated32'; export * from './Warning/Warning'; export * from './Warning/Warning16'; export * from './Warning/Warning24'; -export * from './Warning/Warning32'; \ No newline at end of file +export * from './Warning/Warning32'; From 035d76894f8050ee29e485bf20b6607c05134fb6 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 23 Jun 2024 19:23:44 +0330 Subject: [PATCH 3/3] update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a73267..86c4023 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@giveth/ui-design-system", - "version": "1.11.30", + "version": "1.11.31", "files": [ "/lib" ],