UNPKG

@lexical/react

Version:

This package provides Lexical components and hooks for React applications.

10 lines (8 loc) 652 B
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import{getExtensionDependencyFromEditor as n,getPeerDependencyFromEditor as t}from"@lexical/extension";import{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";function e(t){return n(o()[0],t)}function r(n){return i(n.name)}function i(n){return t(o()[0],n)}function u(n){return e(n).output.Component}export{u as useExtensionComponent,e as useExtensionDependency,r as useOptionalExtensionDependency,i as usePeerExtensionDependency};