Skip to content

Commit

Permalink
feat(ui-icons): adding IconSearch (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini authored Sep 27, 2024
1 parent b4cbab0 commit b5f6d58
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 1 deletion.
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 @@ -139,5 +139,10 @@
"name": "IconPasskey",
"title": "Passkey",
"monotone": true
},
"magnifying-glass": {
"name": "IconSearch",
"title": "Search",
"monotone": true
}
}
4 changes: 4 additions & 0 deletions packages/ui-icons/lib/icons/svg/magnifying-glass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/ui-icons/src/components/Icons/IconPasskey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const IconPasskey = ({
const opacity = monotone ? "1" : "0.4";
return (
<SvgIcon
defaultViewBox="0 0 216 216"
defaultViewBox="0 0 190 190"
defaultClassName="size-5"
viewBox={viewBox}
className={className}
Expand Down
48 changes: 48 additions & 0 deletions packages/ui-icons/src/components/Icons/IconSearch.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* This file was automatically generated.
* Please do not edit manually.
*
* To update this file, run `yarn build:icons`.
*
* Original name: magnifying-glass.svg
*
* !Font Awesome Pro 6.6.0 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 IconSearch = ({
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="size-5"
viewBox={viewBox}
className={className}
spacing={spacing}
title={title || "Search"}
{...rest}
>
<path
className="fa-secondary"
opacity={opacity}
d="M0 208a208 208 0 1 0 416 0A208 208 0 1 0 0 208zm352 0A144 144 0 1 1 64 208a144 144 0 1 1 288 0z"
/>
<path
className="fa-primary"
d="M330.7 376L457.4 502.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L376 330.7C363.3 348 348 363.3 330.7 376z"
/>
</SvgIcon>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
IconProfile,
IconRefresh,
IconRestore,
IconSearch,
IconSettings,
IconShow,
IconSort,
Expand Down Expand Up @@ -289,6 +290,13 @@ describe("Generic Icons prop tests", () => {
viewBox={viewBox}
spacing={spacing}
/>
<IconSearch
data-testid="icon-search"
className={className}
fill={fill}
viewBox={viewBox}
spacing={spacing}
/>
</>,
);
[
Expand Down Expand Up @@ -322,6 +330,7 @@ describe("Generic Icons prop tests", () => {
"icon-locked",
"icon-key",
"icon-passkey",
"icon-search",
].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 @@ -21,6 +21,7 @@ import { IconPrevious } from "./Icons/IconPrevious";
import { IconProfile } from "./Icons/IconProfile";
import { IconRefresh } from "./Icons/IconRefresh";
import { IconRestore } from "./Icons/IconRestore";
import { IconSearch } from "./Icons/IconSearch";
import { IconSettings } from "./Icons/IconSettings";
import { IconShow } from "./Icons/IconShow";
import { IconSort } from "./Icons/IconSort";
Expand Down Expand Up @@ -54,6 +55,7 @@ export {
IconProfile,
IconRefresh,
IconRestore,
IconSearch,
IconSettings,
IconShow,
IconSort,
Expand Down

0 comments on commit b5f6d58

Please sign in to comment.