move custum shape to shapes
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user