From 79fc0c843753b50ec29ccf27f7278bdc9fb7e620 Mon Sep 17 00:00:00 2001 From: Deepanshu <140803342+deepanshurajput0@users.noreply.github.com> Date: Fri, 20 Feb 2026 16:50:38 +0530 Subject: [PATCH] fix: toolbar dropdown toggle (#28097) --- .../ui/components/editor/plugins/ToolbarPlugin.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/ui/components/editor/plugins/ToolbarPlugin.tsx b/packages/ui/components/editor/plugins/ToolbarPlugin.tsx index c71267678e..9f2eb21a0f 100644 --- a/packages/ui/components/editor/plugins/ToolbarPlugin.tsx +++ b/packages/ui/components/editor/plugins/ToolbarPlugin.tsx @@ -29,7 +29,7 @@ import { createPortal } from "react-dom"; import { Button } from "../../button"; import { Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../dropdown"; -import { ChevronDownIcon } from "@coss/ui/icons"; +import { ChevronDownIcon, ChevronUpIcon } from "@coss/ui/icons"; import type { TextEditorProps } from "../types"; import { AddVariablesDropdown } from "./AddVariablesDropdown"; @@ -247,7 +247,7 @@ export default function ToolbarPlugin(props: TextEditorProps) { const [isLink, setIsLink] = useState(false); const [isBold, setIsBold] = useState(false); const [isItalic, setIsItalic] = useState(false); - + const [isOpen, setIsOpen] = useState(false); const formatParagraph = () => { if (blockType !== "paragraph") { editor.update(() => { @@ -459,14 +459,16 @@ export default function ToolbarPlugin(props: TextEditorProps) { <> {!props.excludedToolbarItems?.includes("blockType") && ( <> - + <> {blockTypeToBlockName[blockType as keyof BlockType]} - + { + isOpen ? () : () + }