Skip to content

Commit

Permalink
feat: adding IconSort (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini authored Apr 15, 2024
1 parent 3a96dbe commit 9f8b17b
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 5 deletions.
6 changes: 5 additions & 1 deletion packages/ui-icons/lib/icons/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@
},
"circle-star": {
"name": "IconStarInCircle",
"title": "Star in Circle",
"title": "Star in Circle"
},
"arrow-down-arrow-up": {
"name": "IconSort",
"title": "Sort",
"monotone": true
}
}
4 changes: 4 additions & 0 deletions packages/ui-icons/lib/icons/svg/arrow-down-arrow-up.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/IconSort.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: arrow-down-arrow-up.svg
*
* !Font Awesome Pro 6.5.2 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 IconSort = ({
className,
viewBox,
spacing,
title,

monotone,
...rest
}: IconsProps) => {
/* v8 ignore next 1 */
const opacity = monotone ? "1" : "0.4";
return (
<SvgIcon
defaultViewBox="0 0 576 512"
defaultClassName="h-5 w-5"
viewBox={viewBox}
className={className}
spacing={spacing}
title={title || "Sort"}
{...rest}
>
<path
className="fa-secondary"
opacity={opacity}
d="M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L448 141.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V141.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96z"
/>
<path
className="fa-primary"
d="M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z"
/>
</SvgIcon>
);
};
6 changes: 2 additions & 4 deletions packages/ui-icons/src/components/Icons/IconStarInCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ export const IconStarInCircle = ({
viewBox,
spacing,
title,

// eslint-disable-next-line @typescript-eslint/no-unused-vars
monotone,
...rest
}: IconsProps) => {
/* v8 ignore next 1 */
const opacity = monotone ? "1" : "0.4";
return (
<SvgIcon
defaultViewBox="0 0 512 512"
Expand All @@ -37,7 +35,7 @@ export const IconStarInCircle = ({
>
<path
className="fa-secondary"
opacity={opacity}
opacity="0.4"
d="M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM256 104c-6.1 0-11.7 3.5-14.3 8.9l-36.2 73.4-81 11.8c-6 .9-11 5.1-12.9 10.9s-.3 12.2 4 16.4l58.6 57.2-13.8 80.7c-1 6 1.4 12.1 6.4 15.6s11.5 4.1 16.8 1.2L256 342.1l72.5 38.1c5.4 2.8 11.9 2.4 16.9-1.2s7.4-9.6 6.4-15.6l-13.8-80.7 58.6-57.2c4.4-4.3 5.9-10.6 4-16.4s-6.9-10-12.9-10.9l-81.1-11.8-36.2-73.4c-2.7-5.5-8.3-8.9-14.3-8.9z"
/>
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
IconRestore,
IconSettings,
IconShow,
IconSort,
IconStarInCircle,
IconUp,
IconUser,
Expand Down Expand Up @@ -233,6 +234,13 @@ describe("Generic Icons prop tests", () => {
viewBox={viewBox}
spacing={spacing}
/>
<IconSort
data-testid="icon-sort"
className={className}
fill={fill}
viewBox={viewBox}
spacing={spacing}
/>
</>,
);

Expand Down Expand Up @@ -260,6 +268,7 @@ describe("Generic Icons prop tests", () => {
"icon-up",
"icon-add",
"icon-star-in-circle",
"icon-sort",
].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
Expand Up @@ -19,6 +19,7 @@ import { IconProfile } from "./Icons/IconProfile";
import { IconRestore } from "./Icons/IconRestore";
import { IconSettings } from "./Icons/IconSettings";
import { IconShow } from "./Icons/IconShow";
import { IconSort } from "./Icons/IconSort";
import { IconStarInCircle } from "./Icons/IconStarInCircle";
import { IconUp } from "./Icons/IconUp";
import { IconUser } from "./Icons/IconUser";
Expand All @@ -45,6 +46,7 @@ export {
IconRestore,
IconSettings,
IconShow,
IconSort,
IconStarInCircle,
IconUp,
IconUser,
Expand Down

0 comments on commit 9f8b17b

Please sign in to comment.