UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

49 lines (48 loc) 2.56 kB
import type { PropsWithChildren } from 'react'; import React from 'react'; import type { EditorContainerWidth } 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'; type ResizableTableContainerProps = { allowFixedColumnWidthOption?: boolean; className: string; containerWidth: number; editorView: EditorView; getPos: () => number | undefined; isChromelessEditor?: boolean; isCommentEditor?: boolean; isResizing?: boolean; isTableAlignmentEnabled?: boolean; isTableScalingEnabled?: boolean; isWholeTableInDanger?: boolean; lineLength: number | undefined; node: PMNode; pluginInjectionApi?: PluginInjectionAPI; shouldUseIncreasedScalingPercent?: boolean; tableRef: HTMLTableElement; tableWrapperHeight?: number; }; export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, allowFixedColumnWidthOption, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<ResizableTableContainerProps>) => React.JSX.Element>; type TableContainerProps = { allowFixedColumnWidthOption?: boolean; className: string; containerWidth: EditorContainerWidth; editorView: EditorView; getPos: () => number | undefined; isChromelessEditor?: boolean; isCommentEditor?: boolean; isNested: boolean; isResizing?: boolean; isTableAlignmentEnabled?: boolean; isTableResizingEnabled: boolean | undefined; isTableScalingEnabled?: boolean; isWholeTableInDanger?: boolean; node: PMNode; pluginInjectionApi?: PluginInjectionAPI; shouldUseIncreasedScalingPercent?: boolean; tableRef: HTMLTableElement; tableWrapperHeight?: number; }; export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, allowFixedColumnWidthOption, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<TableContainerProps>) => React.JSX.Element; export {};