TLUiCommandPalettePromptItemProps

See source code
Table of contents
interface TLUiCommandPalettePromptItemProps<
  TranslationKey extends string = string,
> {}

Properties

id

Keys the item in recents. Only the first palette item with a given id is listed.

id: string;

initialValue

optional

Prefills the input, selected so typing replaces it.

initialValue?: string;

label

The label to display on the item. If it's a string, it will be translated. If it's an object, the keys will be used as the language keys and the values will be translated.

label:
  | {
      [key: string]: TranslationKey;
    }
  | TranslationKey;

placeholder

The input's placeholder while prompting. Translated like label.

placeholder:
  | {
      [key: string]: TranslationKey;
    }
  | TranslationKey;

readonlyOk

optional

If the editor is in readonly mode and the item is not marked as readonlyok, it will not be rendered.

readonlyOk?: boolean;

Methods

onSubmit

Gets the trimmed text, which may be empty.

Parameters

NameDescription

value

string;

Returns

void;

Prev
TLUiCommandPalettePinnedProps
Next
TLUiCommandPaletteProps