demos: fix react demos again

This commit is contained in:
Philipp Kühn
2021-12-17 09:45:35 +01:00
parent 629f4d2a76
commit 6b738f4ecf
6 changed files with 44 additions and 16 deletions

View File

@@ -6,6 +6,10 @@ import Highlight from '@tiptap/extension-highlight'
import './styles.scss'
const MenuBar = ({ editor }) => {
if (!editor) {
return null
}
return (
<>
<button onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()} className={editor.isActive('heading', { level: 1 }) ? 'is-active' : ''}>