| 1 | import { ChevronRight } from "lucide-react"; |
| 2 | import { SlateElement, type SlateElementProps } from "platejs/static"; |
| 3 | |
| 4 | export function ToggleElementStatic(props: SlateElementProps) { |
| 5 | return ( |
| 6 | <SlateElement {...props} className="pl-6"> |
| 7 | <div |
| 8 | className="absolute top-0 -left-0.5 size-6 cursor-pointer items-center justify-center rounded-md p-px text-muted-foreground transition-colors select-none hover:bg-accent [&_svg]:size-4" |
| 9 | contentEditable={false} |
| 10 | > |
| 11 | <ChevronRight className="rotate-0 transition-transform duration-75" /> |
| 12 | </div> |
| 13 | {props.children} |
| 14 | </SlateElement> |
| 15 | ); |
| 16 | } |
| 17 |