diff --git a/commitlint.config.js b/commitlint.config.js
index e24798b..a55f3ad 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -12,10 +12,12 @@ module.exports = {
"Prerelease",
"Chore",
"Build",
+ "Debug",
"Perf",
"Refactor",
"Revert",
"CI",
+ "Style",
"Test",
"Docs",
"WIP"
diff --git a/lefthook.yml b/lefthook.yml
index 9e8191c..45abf28 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -13,4 +13,4 @@ commit-msg:
commitlint:
skip:
- rebase
- run: npx commitlint --edit --color
+ run: bunx --bun commitlint --edit --color
diff --git a/src/components/controls/select/general.jsx b/src/components/controls/select/general.tsx
similarity index 89%
rename from src/components/controls/select/general.jsx
rename to src/components/controls/select/general.tsx
index ec18805..9e7d528 100644
--- a/src/components/controls/select/general.jsx
+++ b/src/components/controls/select/general.tsx
@@ -3,7 +3,7 @@ import { Button } from "@/components/core";
import { d3Extended } from "@/utils";
const GeneralSelectControls = () => {
- const selectedElementIds = useSelector((state) => state.editor.selectedElementIds);
+ const selectedElementIds = useSelector((state: any) => state.editor.selectedElementIds);
return (
diff --git a/src/components/controls/select/index.jsx b/src/components/controls/select/index.tsx
similarity index 93%
rename from src/components/controls/select/index.jsx
rename to src/components/controls/select/index.tsx
index 13f8c7b..12c3b8f 100644
--- a/src/components/controls/select/index.jsx
+++ b/src/components/controls/select/index.tsx
@@ -9,7 +9,7 @@ import { default as ShapeSelectControls } from "./shape";
import { default as TextSelectControls } from "./text";
const SelectControls = () => {
- const selectedElementIds = useSelector((state) => state.editor.selectedElementIds);
+ const selectedElementIds = useSelector((state: any) => state.editor.selectedElementIds);
const ControlComponent = useMemo(() => {
const firstElementType = document.getElementById(selectedElementIds[0])?.getAttribute?.(dataAttributes.elementType);
diff --git a/src/components/controls/select/text.jsx b/src/components/controls/select/text.tsx
similarity index 96%
rename from src/components/controls/select/text.jsx
rename to src/components/controls/select/text.tsx
index ec0c41e..4cd03a6 100644
--- a/src/components/controls/select/text.jsx
+++ b/src/components/controls/select/text.tsx
@@ -3,7 +3,7 @@ import { d3Extended, rgbToHex } from "@/utils";
import { default as ControlInput } from "../control-input";
const TextSelectControls = () => {
- const selectedElementIds = useSelector((state) => state.editor.selectedElementIds);
+ const selectedElementIds = useSelector((state: any) => state.editor.selectedElementIds);
const firstElement = document.getElementById(selectedElementIds[0]);
diff --git a/src/components/core/button.tsx b/src/components/core/button.tsx
index fe1b20a..9627456 100644
--- a/src/components/core/button.tsx
+++ b/src/components/core/button.tsx
@@ -48,6 +48,7 @@ interface ButtonProps extends React.HTMLProps
{
wrapperClassName?: string;
target?: string;
ariaLabel?: string;
+ variant?: "primary" | "secondary";
}
const Button = ({ to, wrapperClassName, target, ariaLabel, ...props }: ButtonProps) => {
diff --git a/src/components/core/icon-button.tsx b/src/components/core/icon-button.tsx
index 508be82..f9bda17 100644
--- a/src/components/core/icon-button.tsx
+++ b/src/components/core/icon-button.tsx
@@ -2,7 +2,12 @@ import { twMerge } from "tailwind-merge";
import { default as Button } from "./button";
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip";
-const IconButton = ({ label, icon, className, ...props }) => {
+interface IconButtonProps extends React.ComponentProps {
+ label?: string;
+ icon: React.ReactNode;
+}
+
+const IconButton: React.FC = ({ label, icon, className, ...props }) => {
const button = (