Skip to content

Commit

Permalink
feat: add pin icons (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
urietberger authored Feb 7, 2022
1 parent 04240ea commit 1417746
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/foundation/Icon/Generated/IconPin.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { memo } from "react";
import { GeneratedIconProps } from "@foundation/Icon/IconProps";
import { IconSize, IconSizeMap } from "@foundation/Icon/IconSize";

function IconPin(props: GeneratedIconProps): React.ReactElement<GeneratedIconProps> {
const customClassName = [
"tw-flex tw-items-center tw-justify-center tw-fill-current",
IconSizeMap[props.size || IconSize.Size16],
].join(" ");
return (
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
className={customClassName}
name="IconPin"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M15.498 2.364a2.01 2.01 0 0 0-2.363.817L9.92 8.234a7.07 7.07 0 0 0-4.674.868l-.003.001a2.01 2.01 0 0 0-.402 3.158L7.76 15.18l-5.29 5.29a.75.75 0 1 0 1.06 1.06l5.29-5.29 2.92 2.92a2.012 2.012 0 0 0 3.157-.403l.002-.003a7.07 7.07 0 0 0 .868-4.674l5.052-3.215a2.01 2.01 0 0 0 .343-3.117l-4.91-4.91a2.01 2.01 0 0 0-.754-.474Zm-.723 1.389a.51.51 0 0 1 .417.146L20.1 8.81a.51.51 0 0 1-.088.79l-5.485 3.491a.75.75 0 0 0-.327.809 5.57 5.57 0 0 1-.598 4.1.51.51 0 0 1-.801.101L5.9 11.2l-.001-.002a.51.51 0 0 1 .101-.8 5.57 5.57 0 0 1 4.1-.6.75.75 0 0 0 .809-.326l3.49-5.486a.511.511 0 0 1 .375-.233Z"
/>
</svg>
);
}

const Memo = memo(IconPin);
export default Memo;
30 changes: 30 additions & 0 deletions src/foundation/Icon/Generated/IconPinFilled.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { memo } from "react";
import { GeneratedIconProps } from "@foundation/Icon/IconProps";
import { IconSize, IconSizeMap } from "@foundation/Icon/IconSize";

function IconPinFilled(props: GeneratedIconProps): React.ReactElement<GeneratedIconProps> {
const customClassName = [
"tw-flex tw-items-center tw-justify-center tw-fill-current",
IconSizeMap[props.size || IconSize.Size16],
].join(" ");
return (
<svg
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
className={customClassName}
name="IconPinFilled"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M15.498 2.364a2.01 2.01 0 0 0-2.363.817L9.92 8.234a7.07 7.07 0 0 0-4.674.868l-.003.001a2.01 2.01 0 0 0-.402 3.158L7.76 15.18l-5.29 5.29a.75.75 0 1 0 1.06 1.06l5.29-5.29 2.92 2.92a2.012 2.012 0 0 0 3.157-.403l.002-.003a7.07 7.07 0 0 0 .868-4.674l5.052-3.215a2.01 2.01 0 0 0 .343-3.117l-4.91-4.91a2.01 2.01 0 0 0-.754-.474Z"
/>
</svg>
);
}

const Memo = memo(IconPinFilled);
export default Memo;
2 changes: 2 additions & 0 deletions src/foundation/Icon/Generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ export { default as IconPatternLibrary } from "./IconPatternLibrary";
export { default as IconPause } from "./IconPause";
export { default as IconPen } from "./IconPen";
export { default as IconPills } from "./IconPills";
export { default as IconPin } from "./IconPin";
export { default as IconPinFilled } from "./IconPinFilled";
export { default as IconPlanning } from "./IconPlanning";
export { default as IconPlay } from "./IconPlay";
export { default as IconPlus } from "./IconPlus";
Expand Down
2 changes: 2 additions & 0 deletions src/foundation/Icon/IconEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ export enum IconEnum {
Pause = "Pause",
Pen = "Pen",
Pills = "Pills",
Pin = "Pin",
PinFilled = "PinFilled",
Planning = "Planning",
Play = "Play",
Plus = "Plus",
Expand Down
4 changes: 4 additions & 0 deletions src/foundation/Icon/IconsMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ import IconPatternLibrary from "@foundation/Icon/Generated/IconPatternLibrary";
import IconPause from "@foundation/Icon/Generated/IconPause";
import IconPen from "@foundation/Icon/Generated/IconPen";
import IconPills from "@foundation/Icon/Generated/IconPills";
import IconPin from "@foundation/Icon/Generated/IconPin";
import IconPinFilled from "@foundation/Icon/Generated/IconPinFilled";
import IconPlanning from "@foundation/Icon/Generated/IconPlanning";
import IconPlay from "@foundation/Icon/Generated/IconPlay";
import IconPlus from "@foundation/Icon/Generated/IconPlus";
Expand Down Expand Up @@ -435,6 +437,8 @@ export const iconsMap: Record<IconEnum, ReactElement> = {
[IconEnum.Pause]: <IconPause />,
[IconEnum.Pen]: <IconPen />,
[IconEnum.Pills]: <IconPills />,
[IconEnum.Pin]: <IconPin />,
[IconEnum.PinFilled]: <IconPinFilled />,
[IconEnum.Planning]: <IconPlanning />,
[IconEnum.Play]: <IconPlay />,
[IconEnum.Plus]: <IconPlus />,
Expand Down
3 changes: 3 additions & 0 deletions src/foundation/Icon/Svg/Pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/foundation/Icon/Svg/PinFilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1417746

Please sign in to comment.