remove line and peykan from sidebar and added to shape
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { clx } from "@/helpers/utils";
|
||||
import {
|
||||
ArrowLeft,
|
||||
Gallery,
|
||||
Grid8,
|
||||
MouseSquare,
|
||||
@@ -9,7 +8,6 @@ import {
|
||||
Text,
|
||||
VideoSquare,
|
||||
Music,
|
||||
Minus,
|
||||
Link2,
|
||||
Magicpen,
|
||||
} from "iconsax-react";
|
||||
@@ -17,15 +15,13 @@ import type { ToolType } from "../../store/editorStore";
|
||||
|
||||
const tools: Array<{ icon: (color: string, variant?: "Bold" | "Outline" | "Broken" | "Bulk" | "Linear" | "TwoTone") => React.ReactNode; tool: ToolType; label: string }> = [
|
||||
{ icon: (color, variant) => <MouseSquare size={20} color={color} variant={variant} />, tool: "select", label: "انتخاب" },
|
||||
{ icon: (color, variant) => <Shapes size={20} color={color} variant={variant} />, tool: "rectangle", label: "مستطیل" },
|
||||
{ icon: (color, variant) => <Shapes size={20} color={color} variant={variant} />, tool: "rectangle", label: "اشکال" },
|
||||
{ icon: (color, variant) => <Text size={20} color={color} variant={variant} />, tool: "text", label: "متن" },
|
||||
{ icon: (color, variant) => <Grid8 size={20} color={color} variant={variant} />, tool: "grid", label: "گرید" },
|
||||
{ icon: (color, variant) => <Gallery size={20} color={color} variant={variant} />, tool: "image", label: "گالری" },
|
||||
{ icon: (color, variant) => <Link2 size={20} color={color} variant={variant} />, tool: "link", label: "لینک" },
|
||||
{ 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) => <ArrowLeft size={20} color={color} variant={variant} />, tool: "arrow", label: "پیکان" },
|
||||
{ icon: (color, variant) => <Minus size={20} color={color} variant={variant} />, tool: "line", 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: "شکل سفارشی" },
|
||||
];
|
||||
@@ -39,7 +35,10 @@ const ToolsBar = ({ tool, onToolClick }: ToolsBarProps) => {
|
||||
return (
|
||||
<div className="flex h-full max-w-[72px] flex-1 flex-col items-center gap-4 overflow-y-auto border-l border-border py-2">
|
||||
{tools.map((item, index) => {
|
||||
const isActive = tool === item.tool;
|
||||
const isActive =
|
||||
item.tool === "rectangle"
|
||||
? tool === "rectangle" || tool === "line" || tool === "arrow"
|
||||
: tool === item.tool;
|
||||
const iconColor = "black";
|
||||
const iconVariant: "Bold" | "Outline" | "Broken" | "Bulk" | "Linear" | "TwoTone" | undefined = isActive ? "Bold" : "Outline";
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user