Skip to content

Commit

Permalink
Created PlusIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-rmz committed Apr 10, 2024
1 parent af8fc7a commit aaa6f4a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 42 deletions.
23 changes: 2 additions & 21 deletions components/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from "react";
import { usePathname } from "next/navigation";
import UserProfileButton from "@/components/UserProfileButton";
import ChevronRightIcon from "./icons/ChevronRightIcon";
import PlusIcon from "./icons/PlusIcon";

export default function ProjectCard() {
const pathname = usePathname();
Expand All @@ -17,27 +18,7 @@ export default function ProjectCard() {
<UserProfileButton size="xs" className="mx-[-6px]" />
<UserProfileButton size="xs" className="mx-[-6px]" />
<UserProfileButton size="xs" className="mx-[-6px]" />
<button
disabled
className={
"group mx-[-6px] rounded-full bg-white p-2 text-primary drop-shadow-lg"
}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={2.5}
stroke="currentColor"
className="h-4 w-4"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M12 4.5v15m7.5-7.5h-15"
/>
</svg>
</button>
<PlusIcon size="h-4 w-4" color="primary" />
</div>
</div>
<ChevronRightIcon path="/projects/1" currentPath={pathname} />
Expand Down
23 changes: 2 additions & 21 deletions components/ProjectExtendedCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from "react";
import { usePathname } from "next/navigation";
import UserProfileButton from "@/components/UserProfileButton";
import ChevronRightIcon from "./icons/ChevronRightIcon";
import PlusIcon from "./icons/PlusIcon";

const ProjectExtendedCard = () => {
const pathname = usePathname();
Expand All @@ -22,27 +23,7 @@ const ProjectExtendedCard = () => {
<UserProfileButton size="xs" className="mx-[-6px]" />
<UserProfileButton size="xs" className="mx-[-6px]" />
<UserProfileButton size="xs" className="mx-[-6px]" />
<button
disabled
className={
"group mx-[-6px] rounded-full bg-white p-2 text-primary drop-shadow-lg"
}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={2.5}
stroke="currentColor"
className="h-4 w-4"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M12 4.5v15m7.5-7.5h-15"
/>
</svg>
</button>
<PlusIcon size="h-4 w-4" color="primary" />
</div>
<ChevronRightIcon path="/projects/1" currentPath={pathname} />
</div>
Expand Down
33 changes: 33 additions & 0 deletions components/icons/PlusIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
interface PlusIconInterface {
color: string;
size: string;
}

const PlusIcon = ({ color, size }: PlusIconInterface) => {
return (
<button
disabled
className={
"group mx-[-6px] rounded-full bg-white p-2 text-primary drop-shadow-lg"
}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={2.5}
stroke="currentColor"
// className="h-4 w-4"
className={`${size} ${color}`}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M12 4.5v15m7.5-7.5h-15"
/>
</svg>
</button>
);
};

export default PlusIcon;

0 comments on commit aaa6f4a

Please sign in to comment.