"use client"; import { useToggleButton, useToggleButtonState } from "@platejs/toggle/react"; import { ChevronRightIcon } from "lucide-react"; import { PlateElement, type PlateElementProps } from "platejs/react"; import * as React from "react"; import { cn } from "@/lib/utils"; export function ToggleElement({ children, ...props }: PlateElementProps) { const element = props.element; const state = useToggleButtonState(element.id as string); const { buttonProps, open } = useToggleButton(state); return (
{children}
); }