supermemory/apps/web/app/components/plate-ui/comment-toolbar-button.tsx
2025-01-20 17:50:45 -07:00

20 lines
456 B
TypeScript

'use client';
import React from 'react';
import { useCommentAddButton } from '@udecode/plate-comments/react';
import { MessageSquarePlus } from 'lucide-react';
import { ToolbarButton } from './toolbar';
export function CommentToolbarButton() {
const { hidden, props } = useCommentAddButton();
if (hidden) return null;
return (
<ToolbarButton tooltip="Comment (⌘+⇧+M)" {...props}>
<MessageSquarePlus />
</ToolbarButton>
);
}