From 6b42e1d49cac9be31205c1e1d4120df5890a37e8 Mon Sep 17 00:00:00 2001 From: Arno V Date: Sat, 30 Mar 2024 13:46:26 -0400 Subject: [PATCH] feat(ui-icons): adding IconAdd (#452) ## Summary by CodeRabbit - **New Features** - Introduced a new "Add" icon (`IconAdd`) to enhance the user interface with a clear, monotone design for adding items. --- packages/ui-icons/lib/icons/config.json | 5 ++ packages/ui-icons/lib/icons/svg/plus.svg | 4 ++ .../ui-icons/src/components/Icons/IconAdd.tsx | 46 +++++++++++++++++++ .../components/Icons/__tests__/Icons.test.tsx | 9 ++++ packages/ui-icons/src/components/index.ts | 2 + 5 files changed, 66 insertions(+) create mode 100644 packages/ui-icons/lib/icons/svg/plus.svg create mode 100644 packages/ui-icons/src/components/Icons/IconAdd.tsx diff --git a/packages/ui-icons/lib/icons/config.json b/packages/ui-icons/lib/icons/config.json index 60b31def..97ae2185 100644 --- a/packages/ui-icons/lib/icons/config.json +++ b/packages/ui-icons/lib/icons/config.json @@ -96,5 +96,10 @@ "name": "IconDown", "title": "Down", "monotone": true + }, + "plus": { + "name": "IconAdd", + "title": "Add", + "monotone": true } } diff --git a/packages/ui-icons/lib/icons/svg/plus.svg b/packages/ui-icons/lib/icons/svg/plus.svg new file mode 100644 index 00000000..4c724f40 --- /dev/null +++ b/packages/ui-icons/lib/icons/svg/plus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/ui-icons/src/components/Icons/IconAdd.tsx b/packages/ui-icons/src/components/Icons/IconAdd.tsx new file mode 100644 index 00000000..8d42500f --- /dev/null +++ b/packages/ui-icons/src/components/Icons/IconAdd.tsx @@ -0,0 +1,46 @@ +/** + * This file was automatically generated. + * Please do not edit manually. + * + * To update this file, run `yarn build:icons`. + * + * Original name: plus.svg + * + * !Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc. + * + */ + +import { SvgIcon } from "@versini/ui-private"; + +import type { IconsProps } from "./IconsTypes"; + +export const IconAdd = ({ + className, + viewBox, + spacing, + title, + + monotone, + ...rest +}: IconsProps) => { + /* v8 ignore next 1 */ + const opacity = monotone ? "1" : "0.4"; + return ( + + + + + ); +}; diff --git a/packages/ui-icons/src/components/Icons/__tests__/Icons.test.tsx b/packages/ui-icons/src/components/Icons/__tests__/Icons.test.tsx index 0d009f3c..42facddb 100644 --- a/packages/ui-icons/src/components/Icons/__tests__/Icons.test.tsx +++ b/packages/ui-icons/src/components/Icons/__tests__/Icons.test.tsx @@ -2,6 +2,7 @@ import { render, screen } from "@testing-library/react"; import { SpacingProps } from "@versini/ui-private/dist/utilities"; import { + IconAdd, IconBack, IconBrightness, IconChart, @@ -217,6 +218,13 @@ describe("Generic Icons prop tests", () => { viewBox={viewBox} spacing={spacing} /> + , ); @@ -242,6 +250,7 @@ describe("Generic Icons prop tests", () => { "icon-brightness", "icon-down", "icon-up", + "icon-add", ].forEach(async (dataTestId) => { await renderExpected({ dataTestId, diff --git a/packages/ui-icons/src/components/index.ts b/packages/ui-icons/src/components/index.ts index 523c101d..900ab351 100644 --- a/packages/ui-icons/src/components/index.ts +++ b/packages/ui-icons/src/components/index.ts @@ -1,3 +1,4 @@ +import { IconAdd } from "./Icons/IconAdd"; import { IconBack } from "./Icons/IconBack"; import { IconBrightness } from "./Icons/IconBrightness"; import { IconChart } from "./Icons/IconChart"; @@ -22,6 +23,7 @@ import { IconUp } from "./Icons/IconUp"; import { IconUser } from "./Icons/IconUser"; export { + IconAdd, IconBack, IconBrightness, IconChart,