Skip to content

Commit

Permalink
feat(ui-icons): adding IconAdd (#452)
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**
- Introduced a new "Add" icon (`IconAdd`) to enhance the user interface
with a clear, monotone design for adding items.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
aversini authored Mar 30, 2024
1 parent 1bb0605 commit 6b42e1d
Show file tree
Hide file tree
Showing 5 changed files with 66 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 @@ -96,5 +96,10 @@
"name": "IconDown",
"title": "Down",
"monotone": true
},
"plus": {
"name": "IconAdd",
"title": "Add",
"monotone": true
}
}
4 changes: 4 additions & 0 deletions packages/ui-icons/lib/icons/svg/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions packages/ui-icons/src/components/Icons/IconAdd.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<SvgIcon
defaultViewBox="0 0 448 512"
defaultClassName="h-5 w-5"
viewBox={viewBox}
className={className}
spacing={spacing}
title={title || "Add"}
{...rest}
>
<path
className="fa-secondary"
opacity={opacity}
d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"
/>
<path className="fa-primary" d="" />
</SvgIcon>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { render, screen } from "@testing-library/react";
import { SpacingProps } from "@versini/ui-private/dist/utilities";

import {
IconAdd,
IconBack,
IconBrightness,
IconChart,
Expand Down Expand Up @@ -217,6 +218,13 @@ describe("Generic Icons prop tests", () => {
viewBox={viewBox}
spacing={spacing}
/>
<IconAdd
data-testid="icon-add"
className={className}
fill={fill}
viewBox={viewBox}
spacing={spacing}
/>
</>,
);

Expand All @@ -242,6 +250,7 @@ describe("Generic Icons prop tests", () => {
"icon-brightness",
"icon-down",
"icon-up",
"icon-add",
].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,3 +1,4 @@
import { IconAdd } from "./Icons/IconAdd";
import { IconBack } from "./Icons/IconBack";
import { IconBrightness } from "./Icons/IconBrightness";
import { IconChart } from "./Icons/IconChart";
Expand All @@ -22,6 +23,7 @@ import { IconUp } from "./Icons/IconUp";
import { IconUser } from "./Icons/IconUser";

export {
IconAdd,
IconBack,
IconBrightness,
IconChart,
Expand Down

0 comments on commit 6b42e1d

Please sign in to comment.