'use client' import React from 'react' import type { Editor } from '@tiptap/react' import { Button } from '@/components/ui/button' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' interface StyleMenuProps { editor: Editor | null disabled?: boolean executeCommand: (command: () => void) => void } export function StyleMenu({ editor, disabled, executeCommand }: StyleMenuProps) { if (!editor) return null return ( e.preventDefault()}> executeCommand(() => editor .chain() .focus() .setMark('textStyle', { fontSize: '32px' }) .setBold() .run() ) } > 제목 (굵게 + 32pt) executeCommand(() => editor .chain() .focus() .unsetBold() .setParagraph() .setMark('textStyle', { fontSize: null as unknown as string }) .run() ) } > 본문 (기본) ) }