File size: 364 Bytes
1e92f2d
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import type { DataTType } from '@react-page/editor';
import type { SlatePluginDefinition } from '../types/slatePluginDefinitions';
import useCurrentNodeWithPlugin from './useCurrentNodeWithPlugin';

export default <T extends DataTType>(plugin: SlatePluginDefinition<T>) => {
  const nodeEntry = useCurrentNodeWithPlugin<T>(plugin);
  return Boolean(nodeEntry);
};