/** * 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 type { ComponentProps } from 'react'; import { type AnyLexicalExtension, type LexicalExtensionOutput } from 'lexical'; /** * The lexical:extension prop combined with the props of the given Extension's * output Component. */ export type ExtensionComponentProps = { /** The Extension */ 'lexical:extension': Extension; } & ([LexicalExtensionOutput] extends [ { Component: infer OutputComponentType extends React.ComponentType; } ] ? Omit, 'lexical:extension'> : never); /** * A convenient way to get an Extension's output Component with {@link useExtensionComponent} * and construct it in one step. * * @example * Usage * ```tsx * return ( * * ); * ``` * * @example * Alternative without ExtensionComponent * ```tsx * const TreeViewComponent = useExtensionComponent(TreeViewExtension); * return (); * ``` */ export declare function ExtensionComponent({ 'lexical:extension': extension, ...props }: ExtensionComponentProps): import("react/jsx-runtime").JSX.Element;