UNPKG

@atlaskit/editor-plugin-find-replace

Version:

find replace plugin for @atlaskit/editor-core

40 lines (39 loc) 1.55 kB
import React from 'react'; import type { WithIntlProps, WrappedComponentProps } from 'react-intl'; import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics'; import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics'; export type ReplaceProps = { canReplace: boolean; count: { index: number; total: number; totalReplaceable?: number; }; dispatchAnalyticsEvent?: DispatchAnalyticsEvent; findTyped: boolean; focusToolbarButton: () => void; onArrowUp: () => void; onCancel: ({ triggerMethod, }: { triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON; }) => void; onFindNext: ({ triggerMethod, }: { triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON; }) => void; onFindPrev: ({ triggerMethod, }: { triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON; }) => void; onReplace: ({ triggerMethod, replaceText, }: { replaceText: string; triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON; }) => void; onReplaceAll: ({ replaceText }: { replaceText: string; }) => void; onReplaceTextfieldRefSet: (ref: React.RefObject<HTMLInputElement>) => void; replaceText?: string; setFindTyped: (value: boolean) => void; }; declare const _default_1: React.FC<WithIntlProps<ReplaceProps & WrappedComponentProps>> & { WrappedComponent: React.ComponentType<ReplaceProps & WrappedComponentProps>; }; export default _default_1;