This commit is contained in:
2025-12-27 11:14:07 +01:00
parent e9176ff73e
commit 13685d100c
51 changed files with 2685 additions and 1 deletions

View File

@ -0,0 +1,21 @@
'use client';
import * as React from 'react';
import { useMarkToolbarButton, useMarkToolbarButtonState } from 'platejs/react';
import { ToolbarButton } from './toolbar';
export function MarkToolbarButton({
clear,
nodeType,
...props
}: React.ComponentProps<typeof ToolbarButton> & {
nodeType: string;
clear?: string[] | string;
}) {
const state = useMarkToolbarButtonState({ clear, nodeType });
const { props: buttonProps } = useMarkToolbarButton(state);
return <ToolbarButton {...props} {...buttonProps} />;
}