UNPKG

@atlaskit/editor-plugin-toolbar

Version:

Toolbar plugin for @atlaskit/editor-core

10 lines • 471 B
import { createContext, useContext } from 'react'; /** * State of the element toolbar the host is showing, starting with its node. The node changes on * each edit inside it, so `ElementToolbarPopup` re-renders and repositions without re-rendering * the toolbar items. */ export var ElementToolbarContext = /*#__PURE__*/createContext(undefined); export var useElementToolbarContext = function useElementToolbarContext() { return useContext(ElementToolbarContext); };