| 1 | "use client"; |
| 2 | |
| 3 | import { PlateElement, type StyledPlateElementProps } from "platejs/react"; |
| 4 | |
| 5 | import { cn } from "@/lib/utils"; |
| 6 | |
| 7 | export const PresentationElement = ({ |
| 8 | children, |
| 9 | ref, |
| 10 | className, |
| 11 | ...props |
| 12 | }: StyledPlateElementProps) => { |
| 13 | return ( |
| 14 | <PlateElement |
| 15 | ref={ref} |
| 16 | className={cn( |
| 17 | "slate-selectable relative transition-all duration-300 select-text!", |
| 18 | className, |
| 19 | )} |
| 20 | {...props} |
| 21 | > |
| 22 | {children} |
| 23 | </PlateElement> |
| 24 | ); |
| 25 | }; |
| 26 | |
| 27 | PresentationElement.displayName = "PresentationElement"; |
| 28 |