UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

31 lines (30 loc) 1.53 kB
import React from 'react'; import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics'; import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher'; import type { GetEditorFeatureFlags, getPosHandlerNode } from '@atlaskit/editor-common/types'; import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { PluginInjectionAPI } from '../types'; import type { TableOptions } from './types'; type ForwardRef = (node: HTMLElement | null) => any; type TableComponentWithSharedStateProps = { allowColumnResizing?: boolean; allowControls?: boolean; allowFixedColumnWidthOption?: boolean; allowTableAlignment?: boolean; allowTableResizing?: boolean; api?: PluginInjectionAPI; dispatchAnalyticsEvent: DispatchAnalyticsEvent; eventDispatcher: EventDispatcher; forwardRef: ForwardRef; getEditorFeatureFlags: GetEditorFeatureFlags; getNode: () => PmNode; getPos: getPosHandlerNode; options?: TableOptions; view: EditorView; }; /** * Use useSharedPluginState to control re-renders from plugin dependencies */ export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, allowFixedColumnWidthOption, }: TableComponentWithSharedStateProps) => React.JSX.Element; export {};