UNPKG

tinacms

Version:

[![GitHub license](https://img.shields.io/github/license/tinacms/tinacms?color=blue)](https://github.com/tinacms/tinacms/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/tinacms.svg?style=flat)](https://www.npmjs.com/package/tinacms) [![Bui

28 lines (27 loc) 1.48 kB
import React, { type HTMLAttributes, type ReactNode } from 'react'; import { type ComboboxItemProps, ComboboxPopover } from '@ariakit/react'; import { type TElement } from '@udecode/plate-common'; type FilterFn = (item: { keywords?: string[]; value: string; }, search: string) => boolean; export declare const defaultFilter: FilterFn; interface InlineComboboxProps { children: ReactNode; element: TElement; trigger: string; filter?: FilterFn | false; hideWhenNoValue?: boolean; setValue?: (value: string) => void; showTrigger?: boolean; value?: string; } declare const InlineCombobox: ({ children, element, filter, hideWhenNoValue, setValue: setValueProp, showTrigger, trigger, value: valueProp, }: InlineComboboxProps) => React.JSX.Element; declare const InlineComboboxInput: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>; declare const InlineComboboxContent: typeof ComboboxPopover; export type InlineComboboxItemProps = { keywords?: string[]; } & ComboboxItemProps & Required<Pick<ComboboxItemProps, 'value'>>; declare const InlineComboboxItem: ({ className, keywords, onClick, ...props }: InlineComboboxItemProps) => React.JSX.Element; declare const InlineComboboxEmpty: ({ children, className, }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element; export { InlineCombobox, InlineComboboxContent, InlineComboboxEmpty, InlineComboboxInput, InlineComboboxItem, };