Skip to content

Commit

Permalink
feat(Icons): adding IconBrightness (#367)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## 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.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
aversini authored Feb 28, 2024
1 parent f9f9abd commit 68afee2
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ui-icons/lib/icons/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,10 @@
"github": {
"name": "IconGitHub",
"title": "GitHub"
},
"brightness": {
"name": "IconBrightness",
"title": "Brightness",
"monotone": true
}
}
4 changes: 4 additions & 0 deletions packages/ui-icons/lib/icons/svg/brightness.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions packages/ui-icons/src/components/Icons/IconBrightness.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<SvgIcon
defaultViewBox="0 0 512 512"
defaultClassName="h-5 w-5"
viewBox={viewBox}
className={className}
spacing={spacing}
title={title || "Brightness"}
{...rest}
>
<path
className="fa-secondary"
opacity={opacity}
d="M224 80c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V80zM32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32H80c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zm400 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h48c17.7 0 32-14.3 32-32s-14.3-32-32-32H432zM256 512c17.7 0 32-14.3 32-32V432c0-17.7-14.3-32-32-32s-32 14.3-32 32v48c0 17.7 14.3 32 32 32zM73.4 438.6c12.5 12.5 32.8 12.5 45.3 0l32-32c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-32 32c-12.5 12.5-12.5 32.8 0 45.3zm288-333.3c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l32-32c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-32 32zm77.3 333.3c12.5-12.5 12.5-32.8 0-45.3l-32-32c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l32 32c12.5 12.5 32.8 12.5 45.3 0zm-333.3-288c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-32-32c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l32 32z"
/>
<path
className="fa-primary"
d="M160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0z"
/>
</SvgIcon>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SpacingProps } from "@versini/ui-private/dist/utilities";

import {
IconBack,
IconBrightness,
IconChart,
IconClose,
IconCopied,
Expand Down Expand Up @@ -193,6 +194,13 @@ describe("Generic Icons prop tests", () => {
viewBox={viewBox}
spacing={spacing}
/>
<IconBrightness
data-testid="icon-brightness"
className={className}
fill={fill}
viewBox={viewBox}
spacing={spacing}
/>
</>,
);

Expand All @@ -215,6 +223,7 @@ describe("Generic Icons prop tests", () => {
"icon-next",
"icon-previous",
"icon-github",
"icon-brightness",
].forEach(async (dataTestId) => {
await renderExpected({
dataTestId,
Expand Down
2 changes: 2 additions & 0 deletions packages/ui-icons/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -20,6 +21,7 @@ import { IconUser } from "./Icons/IconUser";

export {
IconBack,
IconBrightness,
IconChart,
IconClose,
IconCopied,
Expand Down

0 comments on commit 68afee2

Please sign in to comment.