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 ? () : () + }