From 68afee290cc97e42d0031b9ad0e5754576227ca1 Mon Sep 17 00:00:00 2001 From: Arno V Date: Wed, 28 Feb 2024 16:44:21 -0500 Subject: [PATCH] feat(Icons): adding IconBrightness (#367) ## Summary by CodeRabbit - **New Features** - Added a new "Brightness" icon with dual-tone styling and functionality to adjust opacity for a more intuitive brightness control experience. --- packages/ui-icons/lib/icons/config.json | 5 ++ .../ui-icons/lib/icons/svg/brightness.svg | 4 ++ .../src/components/Icons/IconBrightness.tsx | 49 +++++++++++++++++++ .../components/Icons/__tests__/Icons.test.tsx | 9 ++++ packages/ui-icons/src/components/index.ts | 2 + 5 files changed, 69 insertions(+) create mode 100644 packages/ui-icons/lib/icons/svg/brightness.svg create mode 100644 packages/ui-icons/src/components/Icons/IconBrightness.tsx diff --git a/packages/ui-icons/lib/icons/config.json b/packages/ui-icons/lib/icons/config.json index f0c069bc..1e2014ff 100644 --- a/packages/ui-icons/lib/icons/config.json +++ b/packages/ui-icons/lib/icons/config.json @@ -81,5 +81,10 @@ "github": { "name": "IconGitHub", "title": "GitHub" + }, + "brightness": { + "name": "IconBrightness", + "title": "Brightness", + "monotone": true } } diff --git a/packages/ui-icons/lib/icons/svg/brightness.svg b/packages/ui-icons/lib/icons/svg/brightness.svg new file mode 100644 index 00000000..bec4ced1 --- /dev/null +++ b/packages/ui-icons/lib/icons/svg/brightness.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/ui-icons/src/components/Icons/IconBrightness.tsx b/packages/ui-icons/src/components/Icons/IconBrightness.tsx new file mode 100644 index 00000000..e78d9e60 --- /dev/null +++ b/packages/ui-icons/src/components/Icons/IconBrightness.tsx @@ -0,0 +1,49 @@ +/** + * This file was automatically generated. + * Please do not edit manually. + * + * To update this file, run `yarn build:icons`. + * + * Original name: brightness.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 IconBrightness = ({ + 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 ae4a2b0e..5837ad79 100644 --- a/packages/ui-icons/src/components/Icons/__tests__/Icons.test.tsx +++ b/packages/ui-icons/src/components/Icons/__tests__/Icons.test.tsx @@ -3,6 +3,7 @@ import { SpacingProps } from "@versini/ui-private/dist/utilities"; import { IconBack, + IconBrightness, IconChart, IconClose, IconCopied, @@ -193,6 +194,13 @@ describe("Generic Icons prop tests", () => { viewBox={viewBox} spacing={spacing} /> + , ); @@ -215,6 +223,7 @@ describe("Generic Icons prop tests", () => { "icon-next", "icon-previous", "icon-github", + "icon-brightness", ].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 730d04b4..6ce18ea5 100644 --- a/packages/ui-icons/src/components/index.ts +++ b/packages/ui-icons/src/components/index.ts @@ -1,4 +1,5 @@ import { IconBack } from "./Icons/IconBack"; +import { IconBrightness } from "./Icons/IconBrightness"; import { IconChart } from "./Icons/IconChart"; import { IconClose } from "./Icons/IconClose"; import { IconCopied } from "./Icons/IconCopied"; @@ -20,6 +21,7 @@ import { IconUser } from "./Icons/IconUser"; export { IconBack, + IconBrightness, IconChart, IconClose, IconCopied,