Skip to content

Commit

Permalink
v1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
programming-with-ia committed Sep 10, 2024
1 parent 88f7e47 commit 8252a1f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shadcn-theme-editor",
"version": "1.3.2",
"version": "1.3.3",
"description": "Shadcn Theme Editor",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
4 changes: 2 additions & 2 deletions src/components/editor-open.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";
import { useState } from "react";
import { Sidebar } from "./sidebar";
import { IoColorPalette } from "react-icons/io5";
import clsx from "clsx";
import ColorPalette from "./icons";

function EditorOpenBtn() {
const [isOpen, setIsOpen] = useState(false);
Expand All @@ -12,7 +12,7 @@ function EditorOpenBtn() {
onClick={() => setIsOpen(!isOpen)}
className={clsx("rounded-full p-3 fixed border shadow-md drop-shadow-sm bottom-2 right-2 z-[35]", isOpen?"bg-primary text-primary-foreground":"text-primary bg-primary-foreground opacity-50 hover:opacity-100")}
>
<IoColorPalette size={24} />
<ColorPalette size={24} />
</button>
<Sidebar state={{isOpen, setIsOpen}} />
</div>
Expand Down
16 changes: 16 additions & 0 deletions src/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,19 @@ export const X = (props: SVGProps<SVGSVGElement>) => (
<path d="m6 6 12 12" />
</svg>
);

const ColorPalette = ({size, ...props}: SVGProps<SVGSVGElement> & { size: number }) => (
<svg
stroke="currentColor"
fill="currentColor"
strokeWidth={0}
viewBox="0 0 512 512"
width={size}
height={size}
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path d="M416 352c-12.6-.84-21-4-28-12-14-16-14-36 5.49-52.48l32.82-29.14c50.27-44.41 50.27-117.21 0-161.63C389.26 64.14 339.54 48 287.86 48c-60.34 0-123.39 22-172 65.11-90.46 80-90.46 210.92 0 290.87 45 39.76 105.63 59.59 165.64 60h1.84c60 0 119.07-19.5 161.2-56.77C464 390 464 385 444.62 355.56 440 348 431 353 416 352zM112 208a32 32 0 1 1 32 32 32 32 0 0 1-32-32zm40 135a32 32 0 1 1 32-32 32 32 0 0 1-32 32zm40-199a32 32 0 1 1 32 32 32 32 0 0 1-32-32zm64 271a48 48 0 1 1 48-48 48 48 0 0 1-48 48zm72-239a32 32 0 1 1 32-32 32 32 0 0 1-32 32z" />
</svg>
);
export default ColorPalette;

0 comments on commit 8252a1f

Please sign in to comment.