move custum shape to shapes

This commit is contained in:
hamid zarghami
2026-06-14 12:30:24 +03:30
parent 494a6a53fc
commit c6d1097a30
3 changed files with 11 additions and 6 deletions
@@ -9,7 +9,6 @@ import {
VideoSquare,
Music,
Link2,
Magicpen,
} from "iconsax-react";
import type { ToolType } from "../../store/editorStore";
@@ -23,7 +22,6 @@ const tools: Array<{ icon: (color: string, variant?: "Bold" | "Outline" | "Broke
{ icon: (color, variant) => <VideoSquare size={20} color={color} variant={variant} />, tool: "video", label: "ویدیو" },
{ icon: (color, variant) => <Music size={20} color={color} variant={variant} />, tool: "audio", label: "صدا" },
{ icon: (color, variant) => <Sticker size={20} color={color} variant={variant} />, tool: "sticker", label: "استیکر" },
{ icon: (color, variant) => <Magicpen size={20} color={color} variant={variant} />, tool: "custom-shape", label: "شکل سفارشی" },
];
type ToolsBarProps = {
@@ -37,7 +35,7 @@ const ToolsBar = ({ tool, onToolClick }: ToolsBarProps) => {
{tools.map((item, index) => {
const isActive =
item.tool === "rectangle"
? tool === "rectangle" || tool === "line" || tool === "arrow"
? tool === "rectangle" || tool === "line" || tool === "arrow" || tool === "custom-shape"
: tool === item.tool;
const iconColor = "black";
const iconVariant: "Bold" | "Outline" | "Broken" | "Bulk" | "Linear" | "TwoTone" | undefined = isActive ? "Bold" : "Outline";