Skip to content

Commit

Permalink
➕ Add plus/minus icons (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClumsyVlad authored Mar 22, 2024
1 parent 6c9a2da commit 5ed453f
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/components/icons/minusIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentPropsWithoutRef } from "react";

import { cn } from "@/lib/cn";

export const MinusIcon = ({
className,
...props
}: Pick<ComponentPropsWithoutRef<"svg">, "className">) => {
return (
<svg
className={cn("block", className)}
viewBox="0 -960 960 960"
color="currentColor"
{...props}
>
<path
d="M240-440q-17 0-28.5-11.5T200-480q0-17 11.5-28.5T240-520h480q17 0 28.5 11.5T760-480q0 17-11.5 28.5T720-440H240Z"
fill="currentColor"
/>
</svg>
);
};
22 changes: 22 additions & 0 deletions src/components/icons/plusIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentPropsWithoutRef } from "react";

import { cn } from "@/lib/cn";

export const PlusIcon = ({
className,
...props
}: Pick<ComponentPropsWithoutRef<"svg">, "className">) => {
return (
<svg
className={cn("block", className)}
viewBox="0 -960 960 960"
color="currentColor"
{...props}
>
<path
d="M440-440H240q-17 0-28.5-11.5T200-480q0-17 11.5-28.5T240-520h200v-200q0-17 11.5-28.5T480-760q17 0 28.5 11.5T520-720v200h200q17 0 28.5 11.5T760-480q0 17-11.5 28.5T720-440H520v200q0 17-11.5 28.5T480-200q-17 0-28.5-11.5T440-240v-200Z"
fill="currentColor"
/>
</svg>
);
};
15 changes: 15 additions & 0 deletions stories/components/icons/minusIcon.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Meta, StoryObj } from "@storybook/react";

import { MinusIcon } from "@/components/icons/minusIcon";

const meta = {
title: "Icons/MinusIcon",
component: MinusIcon,
} satisfies Meta<typeof MinusIcon>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Default: Story = {
args: { className: "w-10 h-10" },
};
15 changes: 15 additions & 0 deletions stories/components/icons/plusIcon.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Meta, StoryObj } from "@storybook/react";

import { PlusIcon } from "@/components/icons/plusIcon";

const meta = {
title: "Icons/PlusIcon",
component: PlusIcon,
} satisfies Meta<typeof PlusIcon>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Default: Story = {
args: { className: "w-10 h-10" },
};

0 comments on commit 5ed453f

Please sign in to comment.