@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Function toPickButton

    • Builds a QuickInputButtonLike, accepting a codicon name in place of a hand-built theme icon the same way toPickItem does for item icons.

      Pass the result to PickOptions.buttons (title bar) or PickItemDisplay.buttons (inline on a row), and handle presses with PickOptions.onTriggerButton / PickOptions.onTriggerItemButton. A button with no handler renders but does nothing.

      Parameters

      • icon: string | { id: string }

        A codicon name (e.g. 'refresh') or an explicit icon path

      • opts: PickButtonOptions = {}

        Tooltip, render location, and toggle state

      Returns QuickInputButtonLike

      A button usable as a QuickPick/InputBox button or an item button

      const refresh = toPickButton('refresh', { tooltip: 'Reload the list' });
      const chosen = await pickOne(items, {
      buttons: [refresh],
      onTriggerButton: (button, picker) => {
      if (button === refresh) picker.items = reload();
      },
      });